org.alfresco.repo.security.authentication
Class AuthenticationComponentImpl

java.lang.Object
  extended by org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
      extended by 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
AuthenticationComponentImpl()
           
 
Method Summary
 net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token)
          The default is not to support Authentication token base authentication
protected  void authenticateImpl(java.lang.String userName, char[] password)
          Authenticate
 java.util.Set getDefaultAdministratorUserNames()
          Gets a set of user names who for this particular authentication system should be considered administrators by default.
 java.lang.String getMD4HashedPassword(java.lang.String userName)
          Get the password hash from the DAO
 NTLMMode getNTLMMode()
          This implementation supported MD4 password hashes.
protected  net.sf.acegisecurity.UserDetails getUserDetails(java.lang.String userName)
          We actually have an acegi object so override the default method.
protected  boolean implementationAllowsGuestLogin()
           
 void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
          IOC
 void setAuthenticationManager(net.sf.acegisecurity.AuthenticationManager authenticationManager)
          IOC
 
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultGuestUserNames, getGuestUserName, getGuestUserName, getNodeService, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, 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
 

Constructor Detail

AuthenticationComponentImpl

public AuthenticationComponentImpl()
Method Detail

setAuthenticationManager

public void setAuthenticationManager(net.sf.acegisecurity.AuthenticationManager authenticationManager)
IOC

Parameters:
authenticationManager -

setAuthenticationDao

public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
IOC

Parameters:
authenticationDao -

authenticateImpl

protected void authenticateImpl(java.lang.String userName,
                                char[] password)
                         throws org.alfresco.repo.security.authentication.AuthenticationException
Authenticate

Overrides:
authenticateImpl in class AbstractAuthenticationComponent
Throws:
org.alfresco.repo.security.authentication.AuthenticationException

getUserDetails

protected net.sf.acegisecurity.UserDetails getUserDetails(java.lang.String userName)
We actually have an acegi object so override the default method.

Overrides:
getUserDetails in class AbstractAuthenticationComponent
Returns:

getMD4HashedPassword

public java.lang.String getMD4HashedPassword(java.lang.String userName)
Get the password hash from the DAO

Specified by:
getMD4HashedPassword in interface NLTMAuthenticator
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.AuthenticationException
The default is not to support Authentication token base authentication

Specified by:
authenticate in interface NLTMAuthenticator
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:
getNTLMMode in interface NLTMAuthenticator
Returns:
the NTLM mode

implementationAllowsGuestLogin

protected boolean implementationAllowsGuestLogin()
Specified by:
implementationAllowsGuestLogin in class AbstractAuthenticationComponent

getDefaultAdministratorUserNames

public java.util.Set getDefaultAdministratorUserNames()
Description copied from class: AbstractAuthenticationComponent
Gets 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:
getDefaultAdministratorUserNames in interface AuthenticationComponent
Overrides:
getDefaultAdministratorUserNames in class AbstractAuthenticationComponent
Returns:
a set of user names


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.