Class MidpointAuthentication
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.evolveum.midpoint.authentication.api.config.MidpointAuthentication
- All Implemented Interfaces:
AuthenticationAnonymousChecker
,Serializable
,Principal
,org.springframework.security.core.Authentication
,org.springframework.security.core.CredentialsContainer
public class MidpointAuthentication
extends org.springframework.security.authentication.AbstractAuthenticationToken
implements AuthenticationAnonymousChecker
Authentication token on top of hierarchy.
Wrapper for all authentication modules.
Contains method and variables for finding out the current status of authentication.
Also contains method and variables for easy recovery of authentication flow.
- Author:
- skublik
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthentications
(ModuleAuthentication authentication) boolean
org.springframework.security.core.AuthenticationException
List<AuthModule<?>>
Collection<org.springframework.security.core.GrantedAuthority>
int
getIndexOfModule
(ModuleAuthentication authentication) int
getIndexOfProcessingModule
(boolean createEmptyAuthenticationIfNeeded) getName()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isLast
(ModuleAuthentication moduleAuthentication) boolean
int
resolveParallelModules
(jakarta.servlet.http.HttpServletRequest request, int actualIndex) void
restart()
Restart this authentication, so next request start from one module in authentication sequence.void
setAlreadyAudited
(boolean alreadyAudited) void
setAlreadyCompiledGui
(boolean alreadyCompiledGui) void
setArchetypeOid
(String archetypeOid) void
setArchetypeSelected
(boolean archetypeSelected) void
setAuthenticated
(boolean authenticated) void
setAuthenticationChannel
(AuthenticationChannel authenticationChannel) void
setAuthModules
(List<AuthModule<?>> authModules) void
setAuthorities
(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) void
setCredential
(Object credential) void
setOverLockoutMaxAttempts
(boolean overLockoutMaxAttempts) void
setPrincipal
(Object principal) void
setSequence
(AuthenticationSequenceType sequence) void
setSessionId
(String sessionId) void
setSharedObjects
(Map<Class<?>, Object> sharedObjects) void
setToken
(org.springframework.security.core.Authentication token) boolean
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getDetails, hashCode, setDetails, toString
-
Field Details
-
NO_PROCESSING_MODULE_INDEX
public static final int NO_PROCESSING_MODULE_INDEX- See Also:
-
NO_MODULE_FOUND_INDEX
public static final int NO_MODULE_FOUND_INDEX- See Also:
-
-
Constructor Details
-
MidpointAuthentication
-
-
Method Details
-
getAuthModules
-
setAuthModules
-
getSequence
-
getSequenceIdentifier
-
setSequence
-
getAuthenticationChannel
-
setAuthenticationChannel
-
getAuthentications
-
addAuthentications
-
getAuthorities
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
- Overrides:
getAuthorities
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-
setAuthorities
public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
setCredential
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
setPrincipal
-
setAuthenticated
public void setAuthenticated(boolean authenticated) - Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Overrides:
setAuthenticated
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-
setSessionId
-
getSessionId
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Overrides:
isAuthenticated
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-
getIndexOfProcessingModule
public int getIndexOfProcessingModule(boolean createEmptyAuthenticationIfNeeded) -
isFinished
public boolean isFinished() -
getIndexOfModule
-
getProcessingModuleAuthentication
-
getProcessingModuleAuthenticationIdentifier
-
isAuthenticationFailed
public boolean isAuthenticationFailed() -
isOverLockoutMaxAttempts
public boolean isOverLockoutMaxAttempts() -
setOverLockoutMaxAttempts
public void setOverLockoutMaxAttempts(boolean overLockoutMaxAttempts) -
getName
-
getUsername
-
getFailedReason
-
getFirstFailedAuthenticationModule
-
getAuthenticationExceptionIfExists
public org.springframework.security.core.AuthenticationException getAuthenticationExceptionIfExists() -
getParallelProcessingModules
-
resolveParallelModules
public int resolveParallelModules(jakarta.servlet.http.HttpServletRequest request, int actualIndex) -
isLast
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymous
in interfaceAuthenticationAnonymousChecker
-
hasSucceededAuthentication
public boolean hasSucceededAuthentication() -
wrongConfiguredSufficientModuleExists
public boolean wrongConfiguredSufficientModuleExists() -
authenticationShouldBeAborted
public boolean authenticationShouldBeAborted() -
getProcessingModuleNecessity
-
resolveSecurityPolicyForPrincipal
-
isAlreadyAudited
public boolean isAlreadyAudited() -
setAlreadyAudited
public void setAlreadyAudited(boolean alreadyAudited) -
setArchetypeOid
-
getArchetypeOid
-
setArchetypeSelected
public void setArchetypeSelected(boolean archetypeSelected) -
isArchetypeDefined
public boolean isArchetypeDefined() -
getProcessingModuleOrThrowException
-
setToken
public void setToken(org.springframework.security.core.Authentication token) -
isAlreadyCompiledGui
public boolean isAlreadyCompiledGui() -
setAlreadyCompiledGui
public void setAlreadyCompiledGui(boolean alreadyCompiledGui) -
restart
public void restart()Restart this authentication, so next request start from one module in authentication sequence.
-