org.alfresco.repo.security.authentication
Class SimpleAcceptOrRejectAllAuthenticationComponentImpl

java.lang.Object
  extended by org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
      extended by org.alfresco.repo.security.authentication.SimpleAcceptOrRejectAllAuthenticationComponentImpl
All Implemented Interfaces:
AuthenticationComponent, AuthenticationContext, NLTMAuthenticator

public class SimpleAcceptOrRejectAllAuthenticationComponentImpl
extends AbstractAuthenticationComponent
implements NLTMAuthenticator

This implementation of an AuthenticationComponent can be configured to accept or reject all attempts to login. This only affects attempts to login using a user name and password. Authentication filters etc. could still support authentication but not via user names and passwords. For example, where they set the current user using the authentication component. Then the current user is set in the security context and asserted to be authenticated. By default, the implementation rejects all authentication attempts.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
 
Constructor Summary
SimpleAcceptOrRejectAllAuthenticationComponentImpl()
           
 
Method Summary
 net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token)
          The default is not to support Authentication token base authentication
 void authenticateImpl(java.lang.String userName, char[] password)
          Default unsupported authentication implementation - as of 2.1 this is the best way to implement your own authentication component as it will support guest login - prior to this direct over ride for authenticate(String , char[]) was used.
 java.lang.String getMD4HashedPassword(java.lang.String userName)
          Get the MD4 password hash, as required by NTLM based authentication methods.
 NTLMMode getNTLMMode()
          Get the enum that describes NTLM integration.
protected  boolean implementationAllowsGuestLogin()
           
 void setAccept(boolean accept)
           
 void setSupportNtlm(boolean supportNtlm)
           
 
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultAdministratorUserNames, getDefaultGuestUserNames, getGuestUserName, getGuestUserName, getNodeService, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, 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, getDefaultAdministratorUserNames, 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

SimpleAcceptOrRejectAllAuthenticationComponentImpl

public SimpleAcceptOrRejectAllAuthenticationComponentImpl()
Method Detail

setAccept

public void setAccept(boolean accept)

setSupportNtlm

public void setSupportNtlm(boolean supportNtlm)

authenticateImpl

public void authenticateImpl(java.lang.String userName,
                             char[] password)
                      throws org.alfresco.repo.security.authentication.AuthenticationException
Description copied from class: AbstractAuthenticationComponent
Default unsupported authentication implementation - as of 2.1 this is the best way to implement your own authentication component as it will support guest login - prior to this direct over ride for authenticate(String , char[]) was used. This will still work.

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

implementationAllowsGuestLogin

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

getMD4HashedPassword

public java.lang.String getMD4HashedPassword(java.lang.String userName)
Description copied from interface: NLTMAuthenticator
Get the MD4 password hash, as required by NTLM based authentication methods.

Specified by:
getMD4HashedPassword in interface NLTMAuthenticator
Parameters:
userName - the user name
Returns:
the m d4 hashed password

getNTLMMode

public NTLMMode getNTLMMode()
Description copied from interface: NLTMAuthenticator
Get the enum that describes NTLM integration.

Specified by:
getNTLMMode in interface NLTMAuthenticator
Returns:
the NTLM mode

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


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