use of com.haulmont.cuba.web.security.idp.IdpSessionPrincipal in project cuba by cuba-platform.
the class IdpAuthProvider method userSessionLoggedIn.
@Override
public void userSessionLoggedIn(UserSession session) {
VaadinRequest currentRequest = VaadinService.getCurrentRequest();
if (currentRequest != null) {
Principal principal = currentRequest.getUserPrincipal();
if (principal instanceof IdpSessionPrincipal) {
IdpSession idpSession = ((IdpSessionPrincipal) principal).getIdpSession();
session.setAttribute(IdpService.IDP_USER_SESSION_ATTRIBUTE, idpSession.getId());
}
}
}
Aggregations