This commit is contained in:
Giancarlo Panichi 2016-11-25 17:33:37 +00:00
parent a2c1edf556
commit 6ce6a06e1a
1 changed files with 20 additions and 0 deletions

View File

@ -60,10 +60,30 @@ public class SessionUtil {
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)
.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);
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)
.getFirstName();
String lastName = pContext.getCurrentUser(httpServletRequest)