|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.security.authentication.TestAuthenticationServiceImpl
public class TestAuthenticationServiceImpl
| Constructor Summary | |
|---|---|
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)
|
|
| 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 |
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()
Gets the current ticket as a string. |
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? |
java.lang.String |
getNewTicket(java.lang.String sessionId)
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,
java.lang.String sessionId)
Invalidate a single ticket by ID or remove its association with a given session 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,
java.lang.String sessionId)
Validate a ticket and associate it with a given app server session ID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
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
MutableAuthenticationService
setAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void deleteAuthentication(java.lang.String userName)
throws AuthenticationException
MutableAuthenticationService
deleteAuthentication in interface MutableAuthenticationServiceAuthenticationException
public void setAuthenticationEnabled(java.lang.String userName,
boolean enabled)
throws AuthenticationException
MutableAuthenticationService
setAuthenticationEnabled in interface MutableAuthenticationServiceAuthenticationException
public boolean getAuthenticationEnabled(java.lang.String userName)
throws AuthenticationException
AuthenticationService
getAuthenticationEnabled in interface AuthenticationServiceAuthenticationException
public void authenticate(java.lang.String userName,
char[] password)
throws AuthenticationException
AuthenticationService
authenticate in interface AuthenticationServiceuserName - the usernamepassword - the passowrd
AuthenticationException
public void authenticateAsGuest()
throws AuthenticationException
AuthenticationService
authenticateAsGuest in interface AuthenticationServiceAuthenticationExceptionpublic boolean guestUserAuthenticationAllowed()
AuthenticationService
guestUserAuthenticationAllowed in interface AuthenticationServicepublic boolean authenticationExists(java.lang.String userName)
AuthenticationService
authenticationExists in interface AuthenticationServiceuserName - the username
public boolean isAuthenticationMutable(java.lang.String userName)
MutableAuthenticationService
isAuthenticationMutable in interface MutableAuthenticationServiceuserName - the user ID
true if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
MutableAuthenticationService
isAuthenticationCreationAllowed in interface MutableAuthenticationServicetrue if authentication creation is allowed
public java.lang.String getCurrentUserName()
throws AuthenticationException
AuthenticationService
getCurrentUserName in interface AuthenticationServiceAuthenticationException
public void invalidateUserSession(java.lang.String userName)
throws AuthenticationException
AuthenticationService
invalidateUserSession in interface AuthenticationServiceAuthenticationException
public void invalidateTicket(java.lang.String ticket,
java.lang.String sessionId)
throws AuthenticationException
AuthenticationService
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
AuthenticationService
validate in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable.
AuthenticationExceptionpublic java.lang.String getCurrentTicket()
AuthenticationService
getCurrentTicket in interface AuthenticationServicepublic java.lang.String getCurrentTicket(java.lang.String sessionId)
AuthenticationService
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)
AuthenticationService
getNewTicket in interface AuthenticationServicesessionId - the app server session ID (e.g. HttpSession ID) or null if not applicable.
public void clearCurrentSecurityContext()
AuthenticationService
clearCurrentSecurityContext in interface AuthenticationServicepublic boolean isCurrentUserTheSystemUser()
AuthenticationService
isCurrentUserTheSystemUser in interface AuthenticationServicepublic java.util.Set getDomains()
AuthenticationService
getDomains in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserCreation()
AuthenticationService
getDomainsThatAllowUserCreation in interface AuthenticationServicepublic java.util.Set getDomainsThatAllowUserDeletion()
AuthenticationService
getDomainsThatAllowUserDeletion in interface AuthenticationServicepublic java.util.Set getDomiansThatAllowUserPasswordChanges()
AuthenticationService
getDomiansThatAllowUserPasswordChanges in interface AuthenticationService
public net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName)
throws AuthenticationException
userName - String
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()
AuthenticationService
getDefaultAdministratorUserNames in interface AuthenticationServicepublic java.util.Set getDefaultGuestUserNames()
AuthenticationService
getDefaultGuestUserNames in interface AuthenticationService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||