Class AuthenticationComponentImpl
- java.lang.Object
-
- org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
-
- org.alfresco.repo.security.authentication.AuthenticationComponentImpl
-
- All Implemented Interfaces:
AuthenticationComponent,AuthenticationContext,NLTMAuthenticator
public class AuthenticationComponentImpl extends AbstractAuthenticationComponent implements NLTMAuthenticator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
-
-
Constructor Summary
Constructors Constructor Description AuthenticationComponentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.acegisecurity.Authenticationauthenticate(net.sf.acegisecurity.Authentication token)The default is not to support Authentication token base authenticationprotected voidauthenticateImpl(String userNameIn, char[] password)AuthenticateSet<String>getDefaultAdministratorUserNames()Gets a set of user names who for this particular authentication system should be considered administrators by default.StringgetMD4HashedPassword(String userName)Get the password hash from the DAONTLMModegetNTLMMode()This implementation supported MD4 password hashes.protected net.sf.acegisecurity.UserDetailsgetUserDetails(String userName)We actually have an acegi object so override the default method.protected booleanimplementationAllowsGuestLogin()voidsetAuthenticationDao(MutableAuthenticationDao authenticationDao)IOCvoidsetAuthenticationManager(net.sf.acegisecurity.AuthenticationManager authenticationManager)IOCvoidsetCompositePasswordEncoder(CompositePasswordEncoder passwordEncoder)-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultGuestUserNames, getGuestUserName, getGuestUserName, getNodeService, getNumberFailedAuthentications, getNumberSuccessfulAuthentications, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, onAuthenticate, onFail, setAllowGuestLogin, setAuthenticationContext, setCurrentAuthentication, setCurrentUser, setCurrentUser, 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, getDefaultGuestUserNames, guestUserAuthenticationAllowed, setCurrentUser, setCurrentUser, setGuestUserAsCurrentUser
-
Methods inherited from interface org.alfresco.repo.security.authentication.AuthenticationContext
clearCurrentSecurityContext, getCurrentAuthentication, getCurrentUserName, getGuestUserName, getGuestUserName, getSystemUserName, getSystemUserName, getUserDomain, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, setCurrentAuthentication, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setUserDetails
-
-
-
-
Method Detail
-
setAuthenticationManager
public void setAuthenticationManager(net.sf.acegisecurity.AuthenticationManager authenticationManager)
IOC- Parameters:
authenticationManager- AuthenticationManager
-
setAuthenticationDao
public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
IOC- Parameters:
authenticationDao- MutableAuthenticationDao
-
setCompositePasswordEncoder
public void setCompositePasswordEncoder(CompositePasswordEncoder passwordEncoder)
-
authenticateImpl
protected void authenticateImpl(String userNameIn, char[] password) throws org.alfresco.repo.security.authentication.AuthenticationException
Authenticate- Overrides:
authenticateImplin classAbstractAuthenticationComponent- Parameters:
userNameIn- Stringpassword- char[]- Throws:
org.alfresco.repo.security.authentication.AuthenticationException
-
getUserDetails
protected net.sf.acegisecurity.UserDetails getUserDetails(String userName)
We actually have an acegi object so override the default method.- Overrides:
getUserDetailsin classAbstractAuthenticationComponent- Parameters:
userName- String- Returns:
- UserDetails
-
getMD4HashedPassword
public String getMD4HashedPassword(String userName)
Get the password hash from the DAO- Specified by:
getMD4HashedPasswordin interfaceNLTMAuthenticator- Parameters:
userName- the user name- Returns:
- the m d4 hashed password
-
authenticate
public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token) throws org.alfresco.repo.security.authentication.AuthenticationExceptionThe default is not to support Authentication token base authentication- Specified by:
authenticatein interfaceNLTMAuthenticator- Parameters:
token- Authentication- Returns:
- Authentication
- Throws:
org.alfresco.repo.security.authentication.AuthenticationException- the authentication exception
-
getNTLMMode
public NTLMMode getNTLMMode()
This implementation supported MD4 password hashes.- Specified by:
getNTLMModein interfaceNLTMAuthenticator- Returns:
- the NTLM mode
-
implementationAllowsGuestLogin
protected boolean implementationAllowsGuestLogin()
- Specified by:
implementationAllowsGuestLoginin classAbstractAuthenticationComponent
-
getDefaultAdministratorUserNames
public Set<String> getDefaultAdministratorUserNames()
Description copied from class:AbstractAuthenticationComponentGets a set of user names who for this particular authentication system should be considered administrators by default. If the security framework is case sensitive these values should be case sensitive user names. If the security framework is not case sensitive these values should be the lower-case user names.- Specified by:
getDefaultAdministratorUserNamesin interfaceAuthenticationComponent- Overrides:
getDefaultAdministratorUserNamesin classAbstractAuthenticationComponent- Returns:
- a set of user names
-
-