|
|||||||||
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()
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. |
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 org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationService
createAuthentication
in interface MutableAuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void updateAuthentication(java.lang.String userName, char[] oldPassword, char[] newPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationService
updateAuthentication
in interface MutableAuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void setAuthentication(java.lang.String userName, char[] newPassword) throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationService
setAuthentication
in interface MutableAuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void deleteAuthentication(java.lang.String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationService
deleteAuthentication
in interface MutableAuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void setAuthenticationEnabled(java.lang.String userName, boolean enabled) throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationService
setAuthenticationEnabled
in interface MutableAuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public boolean getAuthenticationEnabled(java.lang.String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
getAuthenticationEnabled
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void authenticate(java.lang.String userName, char[] password) throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
authenticate
in interface AuthenticationService
userName
- the usernamepassword
- the passowrd
org.alfresco.repo.security.authentication.AuthenticationException
public void authenticateAsGuest() throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
authenticateAsGuest
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public boolean guestUserAuthenticationAllowed()
AuthenticationService
guestUserAuthenticationAllowed
in interface AuthenticationService
public boolean authenticationExists(java.lang.String userName)
AuthenticationService
authenticationExists
in interface AuthenticationService
userName
- the username
public boolean isAuthenticationMutable(java.lang.String userName)
MutableAuthenticationService
isAuthenticationMutable
in interface MutableAuthenticationService
userName
- the user ID
true
if this user's authentication may be mutated via the other methods.public boolean isAuthenticationCreationAllowed()
MutableAuthenticationService
isAuthenticationCreationAllowed
in interface MutableAuthenticationService
true
if authentication creation is allowedpublic java.lang.String getCurrentUserName() throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
getCurrentUserName
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void invalidateUserSession(java.lang.String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
invalidateUserSession
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void invalidateTicket(java.lang.String ticket) throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
invalidateTicket
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public void validate(java.lang.String ticket) throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationService
validate
in interface AuthenticationService
org.alfresco.repo.security.authentication.AuthenticationException
public java.lang.String getCurrentTicket()
AuthenticationService
getCurrentTicket
in interface AuthenticationService
public java.lang.String getNewTicket()
AuthenticationService
getNewTicket
in interface AuthenticationService
public void clearCurrentSecurityContext()
AuthenticationService
clearCurrentSecurityContext
in interface AuthenticationService
public boolean isCurrentUserTheSystemUser()
AuthenticationService
isCurrentUserTheSystemUser
in interface AuthenticationService
public java.util.Set getDomains()
AuthenticationService
getDomains
in interface AuthenticationService
public java.util.Set getDomainsThatAllowUserCreation()
AuthenticationService
getDomainsThatAllowUserCreation
in interface AuthenticationService
public java.util.Set getDomainsThatAllowUserDeletion()
AuthenticationService
getDomainsThatAllowUserDeletion
in interface AuthenticationService
public java.util.Set getDomiansThatAllowUserPasswordChanges()
AuthenticationService
getDomiansThatAllowUserPasswordChanges
in interface AuthenticationService
public net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName) throws org.alfresco.repo.security.authentication.AuthenticationException
userName
- String
org.alfresco.repo.security.authentication.AuthenticationException
protected 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 AuthenticationService
public 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 |