[keycloak-user] An ability to evaluate/transform the template variables during the SAML/OpenID protocol mappers processing

Serhii Shymkiv sergey at shimkiv.com
Sat Apr 21 14:11:31 EDT 2018


Hello Guys,
current email thread is inspired by the
https://github.com/keycloak/keycloak/pull/5042
and the question for the community is:
- what do you think if the Keycloak will have an ability to
evaluate/transform the template variables during the SAML/OpenID protocol
mappers processing ?

Examples (please refer to the attached "snapshot-1.png" and
"snapshot-2.png"):
1. "snapshot-1.png":
    ${firstName} ${lastName}
    =>
    the simplest expression, the template variables will be evaluated into
the real values of the user (in this case) properties
    =>
    e.g.: "Serhii Shymkiv" (without quotes, of course)
2. "snapshot-2.png":
    Welcome back, #(${firstName} ${lastName}) ?: ${email}
    =>
    almost the same expression but with additional logic which means that
the value of the #(...) block will be used only if it is not blank (null or
space symbols only) otherwise the expression to the right of the ?:
operator will be evaluated
    =>
    e.g.: "Welcome back, Serhii Shymkiv"
    e.g.: "Welcome back, sergey at shimkiv.com"

Thank you for you time.




-- 
Best regards,
Serhii Shymkiv.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot-1.png
Type: image/png
Size: 32632 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20180421/9abacd6b/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot-2.png
Type: image/png
Size: 36018 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20180421/9abacd6b/attachment-0003.png 


More information about the keycloak-user mailing list