From 940fd326ad2e762ded0b49eedb253c8364a469d8 Mon Sep 17 00:00:00 2001 From: spyroukon Date: Fri, 16 Jul 2021 09:21:46 +0000 Subject: [PATCH] removed roles from user info cookie --- .../FrontEndLinkURIAuthenticationSuccessHandler.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/dnetlib/repo/manager/config/FrontEndLinkURIAuthenticationSuccessHandler.java b/src/main/java/eu/dnetlib/repo/manager/config/FrontEndLinkURIAuthenticationSuccessHandler.java index 1143531..cbe6a6d 100644 --- a/src/main/java/eu/dnetlib/repo/manager/config/FrontEndLinkURIAuthenticationSuccessHandler.java +++ b/src/main/java/eu/dnetlib/repo/manager/config/FrontEndLinkURIAuthenticationSuccessHandler.java @@ -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());