Class ChainingAuthenticationComponentImpl
- java.lang.Object
-
- org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
-
- org.alfresco.repo.security.authentication.AbstractChainingAuthenticationComponent
-
- org.alfresco.repo.security.authentication.ChainingAuthenticationComponentImpl
-
- All Implemented Interfaces:
AuthenticationComponent,AuthenticationContext,NLTMAuthenticator
public class ChainingAuthenticationComponentImpl extends AbstractChainingAuthenticationComponent implements NLTMAuthenticator
A chaining authentication component is required for all the beans that wire up an authentication component and not an authentication service. It supports chaining in much the same way and wires up components in the same way as the chaining authentication service wires up services.- Author:
- andyh
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
-
-
Constructor Summary
Constructors Constructor Description ChainingAuthenticationComponentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.acegisecurity.Authenticationauthenticate(net.sf.acegisecurity.Authentication token)NTLM passthrough authentication - if a mode is defined - the first PASS_THROUGH provider is used - if not, the first component that supports NTLM is used if it supports PASS_THROUGHprotected AuthenticationComponentgetAuthenticationComponent(java.lang.String name)Get the authentication component with the specified namejava.util.List<AuthenticationComponent>getAuthenticationComponents()Get the authentication componentsjava.lang.StringgetGuestUserName()Get the guest user namejava.lang.StringgetMD4HashedPassword(java.lang.String userName)Get the MD4 password hashAuthenticationComponentgetMutableAuthenticationComponent()Get the authentication service thta must be at the top of the list (this may be null)NTLMModegetNTLMMode()Get the NTLM mode - this is only what is set if one of the implementations provides support for that mode.protected java.util.Collection<AuthenticationComponent>getUsableAuthenticationComponents()Helper to get authentication componentsvoidsetAuthenticationComponents(java.util.List<AuthenticationComponent> authenticationComponents)Set a list of authentication componentsvoidsetMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)Set the authentication component at the top of the list.voidsetNtlmMode(NTLMMode ntlmMode)-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractChainingAuthenticationComponent
authenticateImpl, getDefaultAdministratorUserNames, getDefaultGuestUserNames, implementationAllowsGuestLogin, setCurrentUser, setCurrentUser, testAuthenticate
-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
authenticate, getDefaultAdministratorUserNames, getDefaultGuestUserNames, guestUserAuthenticationAllowed, setCurrentUser, setCurrentUser, setGuestUserAsCurrentUser
-
Methods inherited from interface org.alfresco.repo.security.authentication.AuthenticationContext
clearCurrentSecurityContext, getCurrentAuthentication, getCurrentUserName, getGuestUserName, getSystemUserName, getSystemUserName, getUserDomain, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, setCurrentAuthentication, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setUserDetails
-
-
-
-
Method Detail
-
getAuthenticationComponents
public java.util.List<AuthenticationComponent> getAuthenticationComponents()
Get the authentication components- Returns:
- - a list of authentication components
-
setAuthenticationComponents
public void setAuthenticationComponents(java.util.List<AuthenticationComponent> authenticationComponents)
Set a list of authentication components
-
getMutableAuthenticationComponent
public AuthenticationComponent getMutableAuthenticationComponent()
Get the authentication service thta must be at the top of the list (this may be null)- Returns:
- AuthenticationComponent
-
setMutableAuthenticationComponent
public void setMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)
Set the authentication component at the top of the list.- Parameters:
mutableAuthenticationComponent- AuthenticationComponent
-
setNtlmMode
public void setNtlmMode(NTLMMode ntlmMode)
-
authenticate
public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token) throws org.alfresco.repo.security.authentication.AuthenticationExceptionNTLM passthrough authentication - if a mode is defined - the first PASS_THROUGH provider is used - if not, the first component that supports NTLM is used if it supports PASS_THROUGH- Specified by:
authenticatein interfaceNLTMAuthenticator- Parameters:
token- Authentication- Returns:
- Authentication
- Throws:
org.alfresco.repo.security.authentication.AuthenticationException- the authentication exception
-
getGuestUserName
public java.lang.String getGuestUserName()
Get the guest user name- Specified by:
getGuestUserNamein interfaceAuthenticationContext- Overrides:
getGuestUserNamein classAbstractAuthenticationComponent- Returns:
- String
-
getMD4HashedPassword
public java.lang.String getMD4HashedPassword(java.lang.String userName)
Get the MD4 password hash- Specified by:
getMD4HashedPasswordin interfaceNLTMAuthenticator- Parameters:
userName- the user name- Returns:
- the m d4 hashed password
-
getNTLMMode
public NTLMMode getNTLMMode()
Get the NTLM mode - this is only what is set if one of the implementations provides support for that mode.- Specified by:
getNTLMModein interfaceNLTMAuthenticator- Returns:
- the NTLM mode
-
getUsableAuthenticationComponents
protected java.util.Collection<AuthenticationComponent> getUsableAuthenticationComponents()
Helper to get authentication components- Specified by:
getUsableAuthenticationComponentsin classAbstractChainingAuthenticationComponent- Returns:
- the usable authentication components
-
getAuthenticationComponent
protected AuthenticationComponent getAuthenticationComponent(java.lang.String name)
Description copied from class:AbstractChainingAuthenticationComponentGet the authentication component with the specified name- Specified by:
getAuthenticationComponentin classAbstractChainingAuthenticationComponent- Parameters:
name- String- Returns:
- the authentication component or null if it does not exist
-
-