Remove comment from email in JWT generator
This commit is contained in:
parent
a0c1c2cee1
commit
e18e1fa680
|
@ -50,20 +50,16 @@ public class JWTGenerator {
|
|||
if (authOIDC.getUserInfo().getGivenName() == null){
|
||||
logger.info("User: " + authOIDC.getUserInfo().getName() + "doesn't have first name");
|
||||
claims.put("firstname", URLEncoder.encode(" ", "UTF-8") + "");
|
||||
// claims.put("firstname", "");
|
||||
} else {
|
||||
claims.put("firstname", URLEncoder.encode(authOIDC.getUserInfo().getGivenName(), "UTF-8") + "");
|
||||
}
|
||||
if (authOIDC.getUserInfo().getFamilyName() == null){
|
||||
logger.info("User: " + authOIDC.getUserInfo().getName() + "doesn't have first name");
|
||||
claims.put("lastname", URLEncoder.encode(" ", "UTF-8") + "");
|
||||
// claims.put("lastname", "");
|
||||
} else {
|
||||
claims.put("lastname", URLEncoder.encode(authOIDC.getUserInfo().getFamilyName(), "UTF-8") + "");
|
||||
}
|
||||
// claims.put("email", authOIDC.getUserInfo().getEmail() + "");
|
||||
claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
|
||||
//
|
||||
claims.put("email", authOIDC.getUserInfo().getEmail() + "");
|
||||
|
||||
// if (userInfo.getAsJsonArray("eduPersonScopedAffiliation").toString() != null) {
|
||||
// claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_scoped_affiliations").toString(), "UTF-8") + "");
|
||||
|
@ -72,7 +68,6 @@ public class JWTGenerator {
|
|||
if (userInfo.getAsJsonArray("edu_person_entitlements") == null){
|
||||
logger.info("User: " + authOIDC.getUserInfo().getName() + "doesn't have role");
|
||||
claims.put("role", URLEncoder.encode(" ", "UTF-8") + "");
|
||||
// claims.put("role", "");
|
||||
} else {
|
||||
claims.put("role", URLEncoder.encode(userInfo.getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue