public class TestAuthenticationServiceImpl extends java.lang.Object implements MutableAuthenticationService
| Constructor and Description |
|---|
TestAuthenticationServiceImpl(java.lang.String domain,
boolean allowCreate,
boolean allowDelete,
boolean allowUpdate,
boolean allowGuest) |
TestAuthenticationServiceImpl(java.lang.String domain,
boolean allowCreate,
boolean allowDelete,
boolean allowUpdate,
boolean allowGuest,
java.util.Map users,
java.util.Set disabled) |
| 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
|
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?
|
java.lang.String |
getNewTicket()
Get a new ticket as a string
|
protected net.sf.acegisecurity.UserDetails |
getUserDetails(java.lang.String userName)
Default implementation that makes an ACEGI object on the fly
|
boolean |
guestUserAuthenticationAllowed()
Check if Guest user authentication is allowed.
|
void |
invalidateTicket(java.lang.String ticket)
Invalidate a single ticket by ID
|
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
|
net.sf.acegisecurity.Authentication |
setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication) |
net.sf.acegisecurity.Authentication |
setCurrentUser(java.lang.String userName)
Explicitly set the current user to be authenticated.
|
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.
|
public TestAuthenticationServiceImpl(java.lang.String domain,
boolean allowCreate,
boolean allowDelete,
boolean allowUpdate,
boolean allowGuest)
public TestAuthenticationServiceImpl(java.lang.String domain,
boolean allowCreate,
boolean allowDelete,
boolean allowUpdate,
boolean allowGuest,
java.util.Map users,
java.util.Set disabled)
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
MutableAuthenticationServicesetAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void deleteAuthentication(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationServicedeleteAuthentication in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void setAuthenticationEnabled(java.lang.String userName,
boolean enabled)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationServicesetAuthenticationEnabled in interface MutableAuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic boolean getAuthenticationEnabled(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServicegetAuthenticationEnabled in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void authenticate(java.lang.String userName,
char[] password)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServiceauthenticate in interface AuthenticationServiceuserName - the usernamepassword - the passowrdorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void authenticateAsGuest()
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServiceauthenticateAsGuest in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic boolean guestUserAuthenticationAllowed()
AuthenticationServiceguestUserAuthenticationAllowed in interface AuthenticationServicepublic boolean authenticationExists(java.lang.String userName)
AuthenticationServiceauthenticationExists in interface AuthenticationServiceuserName - the usernamepublic boolean isAuthenticationMutable(java.lang.String userName)
MutableAuthenticationServiceisAuthenticationMutable in interface MutableAuthenticationServiceuserName - the user IDtrue if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
MutableAuthenticationServiceisAuthenticationCreationAllowed in interface MutableAuthenticationServicetrue if authentication creation is allowedpublic java.lang.String getCurrentUserName()
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServicegetCurrentUserName in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void invalidateUserSession(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServiceinvalidateUserSession in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void invalidateTicket(java.lang.String ticket)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServiceinvalidateTicket in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void validate(java.lang.String ticket)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationServicevalidate in interface AuthenticationServiceorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic java.lang.String getCurrentTicket()
AuthenticationServicegetCurrentTicket in interface AuthenticationServicepublic java.lang.String getNewTicket()
AuthenticationServicegetNewTicket in interface AuthenticationServicepublic void clearCurrentSecurityContext()
AuthenticationServiceclearCurrentSecurityContext in interface AuthenticationServicepublic boolean isCurrentUserTheSystemUser()
AuthenticationServiceisCurrentUserTheSystemUser in interface AuthenticationServicepublic java.util.Set getDomains()
AuthenticationServicegetDomains in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserCreation()
AuthenticationServicegetDomainsThatAllowUserCreation in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserDeletion()
AuthenticationServicegetDomainsThatAllowUserDeletion in interface AuthenticationServicepublic java.util.Set getDomiansThatAllowUserPasswordChanges()
AuthenticationServicegetDomiansThatAllowUserPasswordChanges in interface AuthenticationServicepublic net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
userName - Stringorg.alfresco.repo.security.authentication.AuthenticationExceptionprotected net.sf.acegisecurity.UserDetails getUserDetails(java.lang.String userName)
userName - public net.sf.acegisecurity.Authentication setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
public java.util.Set getDefaultAdministratorUserNames()
AuthenticationServicegetDefaultAdministratorUserNames in interface AuthenticationServicepublic java.util.Set getDefaultGuestUserNames()
AuthenticationServicegetDefaultGuestUserNames in interface AuthenticationServiceCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.