removed roles from user info cookie

This commit is contained in:
Konstantinos Spyrou 2021-07-16 09:21:46 +00:00
parent 27d6111874
commit 940fd326ad
1 changed files with 5 additions and 5 deletions

View File

@ -63,11 +63,11 @@ public class FrontEndLinkURIAuthenticationSuccessHandler implements Authenticati
userInfo.addProperty("lastname", URLEncoder.encode(authOIDC.getUserInfo().getFamilyName(), "UTF-8") + "");
userInfo.addProperty("email", authOIDC.getUserInfo().getEmail() + "");
if (authOIDC.getUserInfo().getSource().getAsJsonArray("edu_person_entitlements") == null)
userInfo.addProperty("role", "");
else
userInfo.addProperty("role", URLEncoder.encode(authOIDC.getUserInfo()
.getSource().getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
// if (authOIDC.getUserInfo().getSource().getAsJsonArray("edu_person_entitlements") == null)
// userInfo.addProperty("role", "");
// else
// userInfo.addProperty("role", URLEncoder.encode(authOIDC.getUserInfo()
// .getSource().getAsJsonArray("edu_person_entitlements").toString(), "UTF-8") + "");
Cookie accessToken = new Cookie("AccessToken", authOIDC.getAccessTokenValue());