getCurrentUserToken fixed: it always returned null
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@134840 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
41919aad9a
commit
569838c6eb
|
@ -258,10 +258,10 @@ public class PortalContext {
|
|||
*/
|
||||
public String getCurrentUserToken(HttpServletRequest httpServletRequest) {
|
||||
String groupIdNo = httpServletRequest.getHeader(VRE_ID_ATTR_NAME);
|
||||
String userToken = null;
|
||||
if (groupIdNo != null) {
|
||||
String scope = getCurrentScope(httpServletRequest);
|
||||
String username = getCurrentUser(httpServletRequest).getUsername();
|
||||
String userToken = null;
|
||||
try {
|
||||
ScopeProvider.instance.set(scope);
|
||||
userToken = authorizationService().resolveTokenByUserAndContext(username, scope);
|
||||
|
@ -287,7 +287,7 @@ public class PortalContext {
|
|||
return toReturn;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return userToken;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue