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