Class ChainingAuthenticationServiceImpl
- java.lang.Object
-
- org.alfresco.repo.security.authentication.AbstractAuthenticationService
-
- org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService
-
- org.alfresco.repo.security.authentication.ChainingAuthenticationServiceImpl
-
- All Implemented Interfaces:
AuthenticationService,MutableAuthenticationService
public class ChainingAuthenticationServiceImpl extends AbstractChainingAuthenticationService
This class implements a simple chaining authentication service. It chains together other authentication services so that authentication can happen against more than one authentication service. The authentication services it uses are stored as a list. Each authentication service must belong to the same domain. This is checked at configuration time. Authentication will try each authentication service in order. If any allow authentication given the user name and password then the user will be accepted. Additions, deletions and password changes are made to one special authentication service. This service will be tried first for authentication. Users can not be created if they exist in another authentication service. To avoid transactional issues in chaining, the services registered with this service must not have transactional wrappers. If not, errors will mark the transaction for roll back and we can not chain down the list of authentication services.- Author:
- Andy Hind
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService
logger
-
Fields inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationService
GUEST_AUTHENTICATION_NOT_SUPPORTED
-
-
Constructor Summary
Constructors Constructor Description ChainingAuthenticationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableAuthenticationServicegetMutableAuthenticationService()Gets the mutable authentication service.protected java.util.List<AuthenticationService>getUsableAuthenticationServices()Gets the authentication services across which methods will chain.voidsetAuthenticationServices(java.util.List<AuthenticationService> authenticationServices)voidsetMutableAuthenticationService(MutableAuthenticationService mutableAuthenticationService)-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService
authenticate, authenticateAsGuest, authenticationExists, clearCurrentSecurityContext, countTickets, createAuthentication, deleteAuthentication, getAuthenticationEnabled, getCurrentTicket, getCurrentUserName, getDefaultAdministratorUserNames, getDefaultGuestUserNames, getDomains, getDomainsThatAllowUserCreation, getDomainsThatAllowUserDeletion, getDomiansThatAllowUserPasswordChanges, getId, getNewTicket, getTicketComponents, getUsersWithTickets, guestUserAuthenticationAllowed, invalidateTicket, invalidateTickets, invalidateUserSession, isAuthenticationCreationAllowed, isAuthenticationMutable, isCurrentUserTheSystemUser, setAuthentication, setAuthenticationEnabled, updateAuthentication, validate
-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationService
getAllowedUsers, getMaxUsers, preAuthenticationCheck, setSysAdminParams
-
-
-
-
Method Detail
-
setAuthenticationServices
public void setAuthenticationServices(java.util.List<AuthenticationService> authenticationServices)
-
getMutableAuthenticationService
public MutableAuthenticationService getMutableAuthenticationService()
Description copied from class:AbstractChainingAuthenticationServiceGets the mutable authentication service.- Specified by:
getMutableAuthenticationServicein classAbstractChainingAuthenticationService- Returns:
- the mutable authentication service
-
setMutableAuthenticationService
public void setMutableAuthenticationService(MutableAuthenticationService mutableAuthenticationService)
-
getUsableAuthenticationServices
protected java.util.List<AuthenticationService> getUsableAuthenticationServices()
Description copied from class:AbstractChainingAuthenticationServiceGets the authentication services across which methods will chain.- Specified by:
getUsableAuthenticationServicesin classAbstractChainingAuthenticationService- Returns:
- the usable authentication services
-
-