added userdata, email to lowercase
This commit is contained in:
@@ -69,7 +69,8 @@ public class OidcTokenManager implements SmartInitializingSingleton {
|
||||
private QOidcToken qOidcToken = QOidcToken.oidcToken;
|
||||
|
||||
/*
|
||||
* @see org.springframework.beans.factory.SmartInitializingSingleton#afterSingletonsInstantiated()
|
||||
* @see org.springframework.beans.factory.SmartInitializingSingleton#
|
||||
* afterSingletonsInstantiated()
|
||||
*/
|
||||
/*
|
||||
* @see org.springframework.beans.factory.SmartInitializingSingleton#
|
||||
@@ -118,7 +119,7 @@ public class OidcTokenManager implements SmartInitializingSingleton {
|
||||
*
|
||||
* @param client the client
|
||||
* @param userId the user id
|
||||
* @param nonce the nonce
|
||||
* @param nonce the nonce
|
||||
* @param scopes the scopes
|
||||
* @param issuer the issuer
|
||||
* @return the oidc token
|
||||
@@ -186,14 +187,17 @@ public class OidcTokenManager implements SmartInitializingSingleton {
|
||||
UserProfileFields.PROFILE_FIELD_EMAIL);
|
||||
UserProfileField emailPrimaryProfileField = userProfileFieldManager.get(user.getId(),
|
||||
UserProfileFields.PROFILE_FIELD_EMAIL_PRIMARY);
|
||||
|
||||
String email = userManager.getBstlyEmail(user.getUsername());
|
||||
if (emailProfileField != null && emailPrimaryProfileField != null
|
||||
&& StringUtils.hasText(emailProfileField.getValue())
|
||||
&& Boolean.getBoolean(emailPrimaryProfileField.getValue())) {
|
||||
claimsSetBuilder.claim("email", emailProfileField.getValue());
|
||||
email = emailProfileField.getValue();
|
||||
} else {
|
||||
claimsSetBuilder.claim("email_verified", true);
|
||||
claimsSetBuilder.claim("email", userManager.getBstlyEmail(user.getUsername()));
|
||||
}
|
||||
|
||||
claimsSetBuilder.claim("email", email.toLowerCase());
|
||||
|
||||
UserProfileField localeProfileField = userProfileFieldManager.get(user.getId(),
|
||||
UserProfileFields.PROFILE_FIELD_LOCALE);
|
||||
|
||||
Reference in New Issue
Block a user