cleanup in DeferredAuthentication

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2022-06-29 19:00:41 +10:00
parent b2aa22fd8f
commit 7929730cb9

View File

@ -120,11 +120,8 @@ public class DeferredAuthentication implements Authentication.Deferred
if (security != null)
{
security.logout(null);
if (_authenticator instanceof LoginAuthenticator)
{
((LoginAuthenticator)_authenticator).logout(request);
return new LoggedOutAuthentication((LoginAuthenticator)_authenticator);
}
_authenticator.logout(request);
return new LoggedOutAuthentication(_authenticator);
}
return Authentication.UNAUTHENTICATED;