public abstract class AbstractChainingAuthenticationComponent extends AbstractAuthenticationComponent
AuthenticationComponent
instances, as returned by getUsableAuthenticationComponents()
.AuthenticationComponent.UserNameValidationMode
Constructor and Description |
---|
AbstractChainingAuthenticationComponent()
Instantiates a new abstract chaining authentication component.
|
Modifier and Type | Method and Description |
---|---|
protected void |
authenticateImpl(String userName,
char[] password)
Chain authentication with user name and password - tries all in order until one works, or fails.
|
protected abstract AuthenticationComponent |
getAuthenticationComponent(String name)
Get the authentication component with the specified name
|
Set<String> |
getDefaultAdministratorUserNames()
Gets a set of user names who for this particular authentication system should be considered administrators by
default.
|
Set<String> |
getDefaultGuestUserNames()
Gets a set of user names who for this particular authentication system should be considered guests by
default.
|
protected abstract Collection<AuthenticationComponent> |
getUsableAuthenticationComponents()
Gets the authentication components across which methods will chain.
|
protected boolean |
implementationAllowsGuestLogin()
If any implementation supports guest then guest is allowed.
|
net.sf.acegisecurity.Authentication |
setCurrentUser(String userName)
Set the current user - try all implementations - as some may check the user exists.
|
net.sf.acegisecurity.Authentication |
setCurrentUser(String userName,
AuthenticationComponent.UserNameValidationMode validationMode)
Explicitly set the current user to be authenticated.
|
void |
testAuthenticate(String authenticatorName,
String userName,
char[] password)
Test authenticate with a specific authenticator and user name and password.
|
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getGuestUserName, getGuestUserName, getNodeService, getNumberFailedAuthentications, getNumberSuccessfulAuthentications, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, onAuthenticate, onFail, setAllowGuestLogin, setAuthenticationContext, setCurrentAuthentication, setDefaultAdministratorUserNameList, setDefaultAdministratorUserNames, setDefaultGuestUserNameList, setDefaultGuestUserNames, setGuestUserAsCurrentUser, setNodeService, setPersonService, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setTransactionService, setUserDetails, setUserRegistrySynchronizer
public AbstractChainingAuthenticationComponent()
protected abstract AuthenticationComponent getAuthenticationComponent(String name)
name
- Stringprotected abstract Collection<AuthenticationComponent> getUsableAuthenticationComponents()
protected void authenticateImpl(String userName, char[] password)
authenticateImpl
in class AbstractAuthenticationComponent
userName
- the user namepassword
- the passwordAuthenticationException
public void testAuthenticate(String authenticatorName, String userName, char[] password)
authenticatorName
- the name of the authenticator to useuserName
- the user namepassword
- the passwordAuthenticationException
- including diagnostic information about the failureprotected boolean implementationAllowsGuestLogin()
implementationAllowsGuestLogin
in class AbstractAuthenticationComponent
public net.sf.acegisecurity.Authentication setCurrentUser(String userName, AuthenticationComponent.UserNameValidationMode validationMode)
AuthenticationComponent
setCurrentUser
in interface AuthenticationComponent
setCurrentUser
in class AbstractAuthenticationComponent
public net.sf.acegisecurity.Authentication setCurrentUser(String userName)
setCurrentUser
in interface AuthenticationComponent
setCurrentUser
in class AbstractAuthenticationComponent
userName
- the user namepublic Set<String> getDefaultAdministratorUserNames()
getDefaultAdministratorUserNames
in interface AuthenticationComponent
getDefaultAdministratorUserNames
in class AbstractAuthenticationComponent
public Set<String> getDefaultGuestUserNames()
getDefaultGuestUserNames
in interface AuthenticationComponent
getDefaultGuestUserNames
in class AbstractAuthenticationComponent
Copyright © 2005–2017 Alfresco Software. All rights reserved.