|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.security.authentication.AbstractAuthenticationService
org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService
public abstract class AbstractChainingAuthenticationService
A base class for chaining authentication services. Where appropriate, methods will 'chain' across multiple
AuthenticationService instances, as returned by AbstractChainingAuthenticationService.getUsableAuthenticationServices().
| Constructor Summary | |
|---|---|
AbstractChainingAuthenticationService()
Instantiates a new abstract chaining authentication service. |
|
| Method Summary | |
|---|---|
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(java.lang.String sessionId)
Gets 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? |
abstract MutableAuthenticationService |
getMutableAuthenticationService()
Gets the mutable authentication service. |
java.lang.String |
getNewTicket(java.lang.String sessionId)
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,
java.lang.String sessionId)
Invalidate a single ticket by ID or remove its association with a given session 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,
java.lang.String sessionId)
Validate a ticket and associate it with a given app server session ID. |
| Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationService |
|---|
getAllowedUsers, getCurrentTicket, getMaxUsers, preAuthenticationCheck, setSysAdminParams |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.alfresco.service.cmr.security.AuthenticationService |
|---|
getCurrentTicket |
| Constructor Detail |
|---|
public AbstractChainingAuthenticationService()
| Method Detail |
|---|
public abstract MutableAuthenticationService getMutableAuthenticationService()
protected abstract java.util.List getUsableAuthenticationServices()
public void createAuthentication(java.lang.String userName,
char[] password)
throws AuthenticationException
MutableAuthenticationService
createAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void updateAuthentication(java.lang.String userName,
char[] oldPassword,
char[] newPassword)
throws AuthenticationException
MutableAuthenticationService
updateAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void setAuthentication(java.lang.String userName,
char[] newPassword)
throws AuthenticationException
setAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void deleteAuthentication(java.lang.String userName)
throws AuthenticationException
deleteAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void setAuthenticationEnabled(java.lang.String userName,
boolean enabled)
throws AuthenticationException
setAuthenticationEnabled in interface MutableAuthenticationServiceAuthenticationExceptionpublic boolean isAuthenticationMutable(java.lang.String userName)
isAuthenticationMutable in interface MutableAuthenticationServiceuserName - the user ID
true if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
isAuthenticationCreationAllowed in interface MutableAuthenticationServicetrue if authentication creation is allowed
public boolean getAuthenticationEnabled(java.lang.String userName)
throws AuthenticationException
getAuthenticationEnabled in interface AuthenticationServiceAuthenticationException
public void authenticate(java.lang.String userName,
char[] password)
throws AuthenticationException
authenticate in interface AuthenticationServiceuserName - the usernamepassword - the passowrd
AuthenticationException
public void authenticateAsGuest()
throws AuthenticationException
authenticateAsGuest in interface AuthenticationServiceAuthenticationExceptionpublic boolean guestUserAuthenticationAllowed()
guestUserAuthenticationAllowed in interface AuthenticationServicepublic boolean authenticationExists(java.lang.String userName)
authenticationExists in interface AuthenticationServiceuserName - the username
public java.lang.String getCurrentUserName()
throws AuthenticationException
getCurrentUserName in interface AuthenticationServiceAuthenticationException
public void invalidateUserSession(java.lang.String userName)
throws AuthenticationException
invalidateUserSession in interface AuthenticationServiceAuthenticationException
public void invalidateTicket(java.lang.String ticket,
java.lang.String sessionId)
throws AuthenticationException
invalidateTicket in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable.
AuthenticationException
public void validate(java.lang.String ticket,
java.lang.String sessionId)
throws AuthenticationException
validate in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable.
AuthenticationExceptionpublic java.lang.String getCurrentTicket(java.lang.String sessionId)
getCurrentTicket in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable. If non-null,
the ticket returned is either a new one or one previously associated with the same sessionId by
AuthenticationService.validate(String, String) or AuthenticationService.getCurrentTicket(String).
public java.lang.String getNewTicket(java.lang.String sessionId)
getNewTicket in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable.
public 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 AuthenticationService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||