This commit is contained in:
Massimiliano Assante 2021-04-06 12:36:13 +02:00
parent f0c5ca5574
commit e567750d6f
1 changed files with 2 additions and 2 deletions

View File

@ -161,9 +161,9 @@ public class StorageHubServiceUtil {
String toReturn = ""; String toReturn = "";
PortalContext pContext = PortalContext.getConfiguration(); PortalContext pContext = PortalContext.getConfiguration();
String currentContext = PortalContext.getConfiguration().getCurrentScope(""+groupId); String currentContext = PortalContext.getConfiguration().getCurrentScope(""+groupId);
long userId = pContext.getCurrentUser(request).getUserId(); String username = pContext.getCurrentUser(request).getUsername();
try { try {
JWTToken umaToken = OIDCUmaUtil.getUMAToken(request, userId, currentContext); JWTToken umaToken = OIDCUmaUtil.getUMAToken(request, username, currentContext);
UmaJWTProvider.instance.set(umaToken.getRaw()); UmaJWTProvider.instance.set(umaToken.getRaw());
} catch (InvalidTokenException | MissingTokenException | RefreshException | NotAuthorizedException } catch (InvalidTokenException | MissingTokenException | RefreshException | NotAuthorizedException
| UMAException e1) { | UMAException e1) {