public abstract class AbstractChainingAuthenticationService extends AbstractAuthenticationService implements MutableAuthenticationService
AuthenticationService instances, as returned by AbstractChainingAuthenticationService.getUsableAuthenticationServices().GUEST_AUTHENTICATION_NOT_SUPPORTED| Constructor and Description |
|---|
AbstractChainingAuthenticationService()
Instantiates a new abstract chaining authentication service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(java.lang.String userName,
char[] password)
Carry out an authentication attempt.
|
void |
authenticateAsGuest()
Authenticate as the guest user.
|
boolean |
authenticationExists(java.lang.String userName)
Check if the given authentication exists.
|
void |
clearCurrentSecurityContext()
Remove the current security information
|
int |
countTickets(boolean nonExpiredOnly) |
void |
createAuthentication(java.lang.String userName,
char[] password)
Create an authentication for the given user.
|
void |
deleteAuthentication(java.lang.String userName)
Delete an authentication entry
|
boolean |
getAuthenticationEnabled(java.lang.String userName)
Is an authentication enabled or disabled?
|
java.lang.String |
getCurrentTicket()
Get the current ticket as a string
|
java.lang.String |
getCurrentUserName()
Get the name of the currently authenticated user.
|
java.util.Set |
getDefaultAdministratorUserNames()
Gets a set of user names who should be considered 'administrators' by default.
|
java.util.Set |
getDefaultGuestUserNames()
Gets a set of user names who should be considered 'guests' by default.
|
java.util.Set |
getDomains()
Get the domain to which this instance of an authentication service applies.
|
java.util.Set |
getDomainsThatAllowUserCreation()
Does this instance alow user to be created?
|
java.util.Set |
getDomainsThatAllowUserDeletion()
Does this instance allow users to be deleted?
|
java.util.Set |
getDomiansThatAllowUserPasswordChanges()
Does this instance allow users to update their passwords?
|
protected java.lang.String |
getId(AuthenticationService authService)
Should be overridden to returns the ID of the authService for use in debug.
|
abstract MutableAuthenticationService |
getMutableAuthenticationService()
Gets the mutable authentication service.
|
java.lang.String |
getNewTicket()
Get a new ticket as a string
|
java.util.Set |
getTicketComponents() |
protected abstract java.util.List |
getUsableAuthenticationServices()
Gets the authentication services across which methods will chain.
|
java.util.Set |
getUsersWithTickets(boolean nonExpiredOnly) |
boolean |
guestUserAuthenticationAllowed()
Check if Guest user authentication is allowed.
|
void |
invalidateTicket(java.lang.String ticket)
Invalidate a single ticket by ID
|
int |
invalidateTickets(boolean nonExpiredOnly) |
void |
invalidateUserSession(java.lang.String userName)
Invalidate any tickets held by the user.
|
boolean |
isAuthenticationCreationAllowed()
Determines whether authentication creation is allowed.
|
boolean |
isAuthenticationMutable(java.lang.String userName)
Determines whether this user's authentication may be mutated via the other methods.
|
boolean |
isCurrentUserTheSystemUser()
Is the current user the system user?
|
void |
setAuthentication(java.lang.String userName,
char[] newPassword)
Set the login information for a user (typically called by an admin user)
|
void |
setAuthenticationEnabled(java.lang.String userName,
boolean enabled)
Enable or disable an authentication entry
|
void |
updateAuthentication(java.lang.String userName,
char[] oldPassword,
char[] newPassword)
Update the login information for the user (typically called by the user)
|
void |
validate(java.lang.String ticket)
Validate a ticket.
|
getAllowedUsers, getMaxUsers, preAuthenticationCheck, setSysAdminParamspublic AbstractChainingAuthenticationService()
public abstract MutableAuthenticationService getMutableAuthenticationService()
protected abstract java.util.List getUsableAuthenticationServices()
public void createAuthentication(java.lang.String userName,
char[] password)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationServicecreateAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void updateAuthentication(java.lang.String userName,
char[] oldPassword,
char[] newPassword)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationServiceupdateAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void setAuthentication(java.lang.String userName,
char[] newPassword)
throws org.alfresco.repo.security.authentication.AuthenticationException
setAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void deleteAuthentication(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
deleteAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void setAuthenticationEnabled(java.lang.String userName,
boolean enabled)
throws org.alfresco.repo.security.authentication.AuthenticationException
setAuthenticationEnabled in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic boolean isAuthenticationMutable(java.lang.String userName)
isAuthenticationMutable in interface MutableAuthenticationServiceuserName - the user IDtrue if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
isAuthenticationCreationAllowed in interface MutableAuthenticationServicetrue if authentication creation is allowedpublic boolean getAuthenticationEnabled(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
getAuthenticationEnabled in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void authenticate(java.lang.String userName,
char[] password)
throws org.alfresco.repo.security.authentication.AuthenticationException
authenticate in interface AuthenticationServiceuserName - the usernamepassword - the passowrdorg.alfresco.repo.security.authentication.AuthenticationExceptionprotected java.lang.String getId(AuthenticationService authService)
authService - in question.public void authenticateAsGuest()
throws org.alfresco.repo.security.authentication.AuthenticationException
authenticateAsGuest in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic boolean guestUserAuthenticationAllowed()
guestUserAuthenticationAllowed in interface AuthenticationServicepublic boolean authenticationExists(java.lang.String userName)
authenticationExists in interface AuthenticationServiceuserName - the usernamepublic java.lang.String getCurrentUserName()
throws org.alfresco.repo.security.authentication.AuthenticationException
getCurrentUserName in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void invalidateUserSession(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
invalidateUserSession in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void invalidateTicket(java.lang.String ticket)
throws org.alfresco.repo.security.authentication.AuthenticationException
invalidateTicket in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void validate(java.lang.String ticket)
throws org.alfresco.repo.security.authentication.AuthenticationException
validate in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic java.lang.String getCurrentTicket()
getCurrentTicket in interface AuthenticationServicepublic java.lang.String getNewTicket()
getNewTicket in interface AuthenticationServicepublic void clearCurrentSecurityContext()
clearCurrentSecurityContext in interface AuthenticationServicepublic boolean isCurrentUserTheSystemUser()
isCurrentUserTheSystemUser in interface AuthenticationServicepublic java.util.Set getDomains()
getDomains in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserCreation()
getDomainsThatAllowUserCreation in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserDeletion()
getDomainsThatAllowUserDeletion in interface AuthenticationServicepublic java.util.Set getDomiansThatAllowUserPasswordChanges()
getDomiansThatAllowUserPasswordChanges in interface AuthenticationServicepublic java.util.Set getUsersWithTickets(boolean nonExpiredOnly)
getUsersWithTickets in class AbstractAuthenticationServicepublic int countTickets(boolean nonExpiredOnly)
countTickets in class AbstractAuthenticationServicepublic int invalidateTickets(boolean nonExpiredOnly)
invalidateTickets in class AbstractAuthenticationServicepublic java.util.Set getTicketComponents()
getTicketComponents in class AbstractAuthenticationServicepublic java.util.Set getDefaultAdministratorUserNames()
getDefaultAdministratorUserNames in interface AuthenticationServicepublic java.util.Set getDefaultGuestUserNames()
getDefaultGuestUserNames in interface AuthenticationServiceCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.