org.alfresco.repo.security.authentication
Class ChainingAuthenticationComponentImpl

java.lang.Object
  extended by org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
      extended by org.alfresco.repo.security.authentication.AbstractChainingAuthenticationComponent
          extended by 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 qire 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 asthe chaining authentication service wires up services.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
 
Constructor Summary
ChainingAuthenticationComponentImpl()
           
 
Method Summary
 net.sf.acegisecurity.Authentication authenticate(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_THROUGH
 java.util.List getAuthenticationComponents()
          Get the authentication components
 java.lang.String getGuestUserName()
          Get the guest user name
 java.lang.String getMD4HashedPassword(java.lang.String userName)
          Get the MD4 password hash
 AuthenticationComponent getMutableAuthenticationComponent()
          Get the authentication service thta must be at the top of the list (this may be null)
 NTLMMode getNTLMMode()
          Get the NTLM mode - this is only what is set if one of the implementations provides support for that mode.
protected  java.util.Collection getUsableAuthenticationComponents()
          Helper to get authentication components
 void setAuthenticationComponents(java.util.List authenticationComponents)
          Set a list of authentication components
 void setMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)
          Set the authentication component at the top of the list.
 void setNtlmMode(NTLMMode ntlmMode)
           
 
Methods inherited from class org.alfresco.repo.security.authentication.AbstractChainingAuthenticationComponent
authenticateImpl, getDefaultAdministratorUserNames, getDefaultGuestUserNames, implementationAllowsGuestLogin, setCurrentUser, setCurrentUser
 
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getGuestUserName, getNodeService, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, 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
 

Constructor Detail

ChainingAuthenticationComponentImpl

public ChainingAuthenticationComponentImpl()
Method Detail

getAuthenticationComponents

public java.util.List getAuthenticationComponents()
Get the authentication components

Returns:
- a list of authentication components

setAuthenticationComponents

public void setAuthenticationComponents(java.util.List authenticationComponents)
Set a list of authentication components

Parameters:
authenticationComponents -

getMutableAuthenticationComponent

public AuthenticationComponent getMutableAuthenticationComponent()
Get the authentication service thta must be at the top of the list (this may be null)

Returns:

setMutableAuthenticationComponent

public void setMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)
Set the authentication component at the top of the list.

Parameters:
mutableAuthenticationComponent -

setNtlmMode

public void setNtlmMode(NTLMMode ntlmMode)

authenticate

public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token)
                                                 throws org.alfresco.repo.security.authentication.AuthenticationException
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_THROUGH

Specified by:
authenticate in interface NLTMAuthenticator
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:
getGuestUserName in interface AuthenticationContext
Overrides:
getGuestUserName in class AbstractAuthenticationComponent
Returns:
String

getMD4HashedPassword

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

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

getUsableAuthenticationComponents

protected java.util.Collection getUsableAuthenticationComponents()
Helper to get authentication components

Specified by:
getUsableAuthenticationComponents in class AbstractChainingAuthenticationComponent
Returns:


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