git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@134898 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a2c1edf556
commit
6ce6a06e1a
|
@ -60,10 +60,30 @@ public class SessionUtil {
|
||||||
scope = pContext.getCurrentScope(httpServletRequest);
|
scope = pContext.getCurrentScope(httpServletRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(scope==null||scope.isEmpty()){
|
||||||
|
String error="Error retrieving scope: "+scope;
|
||||||
|
logger.error(error);
|
||||||
|
throw new ServiceException(error);
|
||||||
|
}
|
||||||
|
|
||||||
userName = pContext.getCurrentUser(httpServletRequest)
|
userName = pContext.getCurrentUser(httpServletRequest)
|
||||||
.getUsername();
|
.getUsername();
|
||||||
|
|
||||||
|
if(userName==null||userName.isEmpty()){
|
||||||
|
String error="Error retrieving username in scope "+scope+": "+userName;
|
||||||
|
logger.error(error);
|
||||||
|
throw new ServiceException(error);
|
||||||
|
}
|
||||||
|
|
||||||
token = pContext.getCurrentUserToken(httpServletRequest);
|
token = pContext.getCurrentUserToken(httpServletRequest);
|
||||||
|
|
||||||
|
if(token==null||token.isEmpty()){
|
||||||
|
String error="Error retrieving token for "+userName+" in "+scope+": "+token;
|
||||||
|
logger.error(error);
|
||||||
|
throw new ServiceException(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String name = pContext.getCurrentUser(httpServletRequest)
|
String name = pContext.getCurrentUser(httpServletRequest)
|
||||||
.getFirstName();
|
.getFirstName();
|
||||||
String lastName = pContext.getCurrentUser(httpServletRequest)
|
String lastName = pContext.getCurrentUser(httpServletRequest)
|
||||||
|
|
Loading…
Reference in New Issue