KEYCLOAK-16380 Make IdP display name available to idp link email subject (#7626)

KEYCLOAK-16380 Make IdP display name available to idp link email subject
This commit is contained in:
Seth 2021-10-04 05:10:18 -04:00 committed by GitHub
parent 8cf35c9b7b
commit 90947404a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,8 +145,13 @@ public class FreeMarkerEmailTemplateProvider implements EmailTemplateProvider {
BrokeredIdentityContext brokerContext = (BrokeredIdentityContext) this.attributes.get(IDENTITY_PROVIDER_BROKER_CONTEXT);
String idpAlias = brokerContext.getIdpConfig().getAlias();
String idpDisplayName = brokerContext.getIdpConfig().getDisplayName();
idpAlias = ObjectUtil.capitalize(idpAlias);
if (idpDisplayName != null) {
idpAlias = ObjectUtil.capitalize(idpDisplayName);
}
attributes.put("identityProviderContext", brokerContext);
attributes.put("identityProviderAlias", idpAlias);