|
|||||||||
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 MutableAuthenticationService
AuthenticationException
public void updateAuthentication(java.lang.String userName, char[] oldPassword, char[] newPassword) throws AuthenticationException
MutableAuthenticationService
updateAuthentication
in interface MutableAuthenticationService
AuthenticationException
public void setAuthentication(java.lang.String userName, char[] newPassword) throws AuthenticationException
setAuthentication
in interface MutableAuthenticationService
AuthenticationException
public void deleteAuthentication(java.lang.String userName) throws AuthenticationException
deleteAuthentication
in interface MutableAuthenticationService
AuthenticationException
public void setAuthenticationEnabled(java.lang.String userName, boolean enabled) throws AuthenticationException
setAuthenticationEnabled
in interface MutableAuthenticationService
AuthenticationException
public boolean isAuthenticationMutable(java.lang.String userName)
isAuthenticationMutable
in interface MutableAuthenticationService
userName
- the user ID
true
if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
isAuthenticationCreationAllowed
in interface MutableAuthenticationService
true
if authentication creation is allowedpublic boolean getAuthenticationEnabled(java.lang.String userName) throws AuthenticationException
getAuthenticationEnabled
in interface AuthenticationService
AuthenticationException
public void authenticate(java.lang.String userName, char[] password) throws AuthenticationException
authenticate
in interface AuthenticationService
userName
- the usernamepassword
- the passowrd
AuthenticationException
public void authenticateAsGuest() throws AuthenticationException
authenticateAsGuest
in interface AuthenticationService
AuthenticationException
public boolean guestUserAuthenticationAllowed()
guestUserAuthenticationAllowed
in interface AuthenticationService
public boolean authenticationExists(java.lang.String userName)
authenticationExists
in interface AuthenticationService
userName
- the username
public java.lang.String getCurrentUserName() throws AuthenticationException
getCurrentUserName
in interface AuthenticationService
AuthenticationException
public void invalidateUserSession(java.lang.String userName) throws AuthenticationException
invalidateUserSession
in interface AuthenticationService
AuthenticationException
public void invalidateTicket(java.lang.String ticket, java.lang.String sessionId) throws AuthenticationException
invalidateTicket
in interface AuthenticationService
sessionId
- 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 AuthenticationService
sessionId
- the app server session ID (e.g. HttpSession ID) or null
if not applicable.
AuthenticationException
public java.lang.String getCurrentTicket(java.lang.String sessionId)
getCurrentTicket
in interface AuthenticationService
sessionId
- 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 AuthenticationService
sessionId
- the app server session ID (e.g. HttpSession ID) or null
if not applicable.
public void clearCurrentSecurityContext()
clearCurrentSecurityContext
in interface AuthenticationService
public boolean isCurrentUserTheSystemUser()
isCurrentUserTheSystemUser
in interface AuthenticationService
public java.util.Set getDomains()
getDomains
in interface AuthenticationService
public java.util.Set getDomainsThatAllowUserCreation()
getDomainsThatAllowUserCreation
in interface AuthenticationService
public java.util.Set getDomainsThatAllowUserDeletion()
getDomainsThatAllowUserDeletion
in interface AuthenticationService
public java.util.Set getDomiansThatAllowUserPasswordChanges()
getDomiansThatAllowUserPasswordChanges
in interface AuthenticationService
public java.util.Set getUsersWithTickets(boolean nonExpiredOnly)
getUsersWithTickets
in class AbstractAuthenticationService
public int countTickets(boolean nonExpiredOnly)
countTickets
in class AbstractAuthenticationService
public int invalidateTickets(boolean nonExpiredOnly)
invalidateTickets
in class AbstractAuthenticationService
public java.util.Set getTicketComponents()
getTicketComponents
in class AbstractAuthenticationService
public java.util.Set getDefaultAdministratorUserNames()
getDefaultAdministratorUserNames
in interface AuthenticationService
public java.util.Set getDefaultGuestUserNames()
getDefaultGuestUserNames
in interface AuthenticationService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |