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
wrapper for all authentication modules, basic authentication token- Author:
- skublik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_MODULE_FOUND_INDEX
static int
NO_PROCESSING_MODULE_INDEX
-
Constructor Summary
Constructors Constructor Description MidpointAuthentication(AuthenticationSequenceType sequence)
-
Method Summary
-
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getDetails, hashCode, setDetails, toString
-
-
-
-
Field Detail
-
NO_PROCESSING_MODULE_INDEX
public static final int NO_PROCESSING_MODULE_INDEX
- See Also:
- Constant Field Values
-
NO_MODULE_FOUND_INDEX
public static final int NO_MODULE_FOUND_INDEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MidpointAuthentication
public MidpointAuthentication(AuthenticationSequenceType sequence)
-
-
Method Detail
-
getAuthModules
public List<AuthModule> getAuthModules()
-
setAuthModules
public void setAuthModules(List<AuthModule> authModules)
-
getSequence
public AuthenticationSequenceType getSequence()
-
getSequenceIdentifier
public String getSequenceIdentifier()
-
setSequence
public void setSequence(AuthenticationSequenceType sequence)
-
getAuthenticationChannel
public AuthenticationChannel getAuthenticationChannel()
-
setAuthenticationChannel
public void setAuthenticationChannel(AuthenticationChannel authenticationChannel)
-
getAuthentications
public List<ModuleAuthentication> getAuthentications()
-
addAuthentications
public void addAuthentications(ModuleAuthentication authentication)
-
getAuthorities
public Collection<org.springframework.security.core.GrantedAuthority> 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
public Object getCredentials()
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
setCredential
public void setCredential(Object credential)
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
setPrincipal
public void setPrincipal(Object principal)
-
setAuthenticated
public void setAuthenticated(boolean authenticated)
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Overrides:
setAuthenticated
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-
setSessionId
public void setSessionId(String sessionId)
-
getSessionId
public String getSessionId()
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Overrides:
isAuthenticated
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-
nonSuccessfulModuleExists
public boolean nonSuccessfulModuleExists(AuthenticationSequenceModuleNecessityType moduleNecessity)
-
getAuthenticationByIdentifier
public ModuleAuthentication getAuthenticationByIdentifier(AuthenticationSequenceModuleType module)
-
isProcessing
public boolean isProcessing()
-
getIndexOfProcessingModule
public int getIndexOfProcessingModule(boolean createEmptyAuthenticationIfNeeded)
-
isFinished
public boolean isFinished()
-
getIndexOfModule
public int getIndexOfModule(ModuleAuthentication authentication)
-
getProcessingModuleAuthentication
public ModuleAuthentication getProcessingModuleAuthentication()
-
getProcessingModuleAuthenticationIdentifier
public String getProcessingModuleAuthenticationIdentifier()
-
isAuthenticationFailed
public boolean isAuthenticationFailed()
-
isMerged
public boolean isMerged()
-
setMerged
public void setMerged(boolean merged)
-
isOverLockoutMaxAttempts
public boolean isOverLockoutMaxAttempts()
-
setOverLockoutMaxAttempts
public void setOverLockoutMaxAttempts(boolean overLockoutMaxAttempts)
-
getName
public String getName()
-
getUsername
public String getUsername()
-
getFailedReason
public String getFailedReason()
-
getFirstFailedAuthenticationModule
public ModuleAuthentication getFirstFailedAuthenticationModule()
-
getAuthenticationExceptionIfExsits
public org.springframework.security.core.AuthenticationException getAuthenticationExceptionIfExsits()
-
getParallelProcessingModules
public List<ModuleAuthentication> getParallelProcessingModules()
-
resolveParallelModules
public int resolveParallelModules(javax.servlet.http.HttpServletRequest request, int actualIndex)
-
isLast
public boolean isLast(ModuleAuthentication moduleAuthentication)
-
isAnonymous
public boolean isAnonymous()
- Specified by:
isAnonymous
in interfaceAuthenticationAnonymousChecker
-
hasSucceededAuthentication
public boolean hasSucceededAuthentication()
-
wrongConfiguredSufficientModuleExists
public boolean wrongConfiguredSufficientModuleExists()
-
authenticationShouldBeAborted
public boolean authenticationShouldBeAborted()
-
getProcessingModuleNecessity
public AuthenticationSequenceModuleNecessityType getProcessingModuleNecessity()
-
resolveSecurityPolicy
public SecurityPolicyType resolveSecurityPolicy() throws SchemaException
- Throws:
SchemaException
-
isAlreadyAudited
public boolean isAlreadyAudited()
-
setAlreadyAudited
public void setAlreadyAudited(boolean alreadyAudited)
-
-