SEBSERV-417 fix autologin

This commit is contained in:
anhefti 2024-06-19 16:48:06 +02:00
parent a31e001f69
commit e0952da7f3

View file

@ -128,12 +128,13 @@ public final class InstitutionalAuthenticationEntryPoint implements Authenticati
.getRequiredWebApplicationContext(request.getServletContext());
final AuthorizationContextHolder authorizationContextHolder = webApplicationContext
.getBean(AuthorizationContextHolder.class);
final SEBServerAuthorizationContext authorizationContext = authorizationContextHolder
SEBServerAuthorizationContext authorizationContext = authorizationContextHolder
.getAuthorizationContext(request.getSession());
// check first if we already have an active session if so, invalidate ir
if (authorizationContext.isLoggedIn()) {
authorizationContext.logout();
authorizationContext = authorizationContextHolder.getAuthorizationContext(request.getSession());
}
if (authorizationContext.autoLogin(jwt)) {