use of io.vertigo.persona.security.UserSession in project vertigo by KleeGroup.
the class SecurityFilter method obtainUserSession.
/**
* Retourne la session utilisateur.
*
* @return Session utilisateur
* @param request HTTPRequest
*/
private UserSession obtainUserSession(final HttpServletRequest request) {
final HttpSession session = request.getSession(false);
UserSession user = getUserSession(session);
// Si la session user n'est pas créée on la crée
if (user == null) {
user = securityManager.createUserSession();
if (session != null) {
session.setAttribute(USER_SESSION, user);
}
}
return user;
}
Aggregations