Class SimpleAcceptOrRejectAllAuthenticationComponentImpl
java.lang.Object
org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
org.alfresco.repo.security.authentication.SimpleAcceptOrRejectAllAuthenticationComponentImpl
- All Implemented Interfaces:
AuthenticationComponent,AuthenticationContext
public class SimpleAcceptOrRejectAllAuthenticationComponentImpl
extends AbstractAuthenticationComponent
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.
- Author:
- Andy Hind
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode -
Field Summary
Fields inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.acegisecurity.Authenticationauthenticate(net.sf.acegisecurity.Authentication token) The default is not to support Authentication token base authenticationvoidauthenticateImpl(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.getMD4HashedPassword(String userName) protected net.sf.acegisecurity.UserDetailsgetUserDetails(String userName) We actually have an acegi object so override the default method.protected booleanvoidsetAccept(boolean accept) voidsetAuthenticationDao(net.sf.acegisecurity.providers.dao.AuthenticationDao authenticationDao) Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultAdministratorUserNames, 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
-
Constructor Details
-
SimpleAcceptOrRejectAllAuthenticationComponentImpl
public SimpleAcceptOrRejectAllAuthenticationComponentImpl()
-
-
Method Details
-
setAuthenticationDao
public void setAuthenticationDao(net.sf.acegisecurity.providers.dao.AuthenticationDao authenticationDao) -
setAccept
public void setAccept(boolean accept) -
authenticateImpl
Description copied from class:AbstractAuthenticationComponentDefault 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:
authenticateImplin classAbstractAuthenticationComponent- Parameters:
userName- Stringpassword- char[]- Throws:
AuthenticationException
-
implementationAllowsGuestLogin
protected boolean implementationAllowsGuestLogin()- Specified by:
implementationAllowsGuestLoginin classAbstractAuthenticationComponent
-
getMD4HashedPassword
-
authenticate
public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token) throws AuthenticationException The default is not to support Authentication token base authentication- Throws:
AuthenticationException
-
getUserDetails
We actually have an acegi object so override the default method.- Overrides:
getUserDetailsin classAbstractAuthenticationComponent- Parameters:
userName- String- Returns:
- UserDetails
-