|
|||||||||
| 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.AuthenticationServiceImpl
public class AuthenticationServiceImpl
| Constructor Summary | |
|---|---|
AuthenticationServiceImpl()
|
|
| 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)
|
boolean |
getAllowsUserCreation()
|
boolean |
getAllowsUserDeletion()
|
boolean |
getAllowsUserPasswordChange()
|
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.lang.String |
getDomain()
|
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 |
java.util.Set |
getTicketComponents()
|
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 expiredOnly)
|
void |
invalidateUserSession(java.lang.String userName)
Invalidate any tickets held by the user. |
boolean |
isActive()
Determines whether this bean is active. |
boolean |
isCurrentUserTheSystemUser()
Is the current user the system user? |
void |
setAllowsUserCreation(boolean allowsUserCreation)
|
void |
setAllowsUserDeletion(boolean allowsUserDeletion)
|
void |
setAllowsUserPasswordChange(boolean allowsUserPasswordChange)
|
void |
setAuditComponent(AuditComponent auditComponent)
|
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent)
|
void |
setDomain(java.lang.String domain)
|
void |
setTicketComponent(TicketComponent ticketComponent)
|
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 |
| Constructor Detail |
|---|
public AuthenticationServiceImpl()
| Method Detail |
|---|
public void setTicketComponent(TicketComponent ticketComponent)
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
public void setAuditComponent(AuditComponent auditComponent)
auditComponent - the auditComponent to setpublic boolean isActive()
ActivateableBean
isActive in interface ActivateableBeantrue if this bean is active
public void authenticate(java.lang.String userName,
char[] password)
throws AuthenticationException
AuthenticationService
authenticate in interface AuthenticationServiceuserName - the usernamepassword - the passowrd
AuthenticationException
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 AuthenticationServiceAuthenticationExceptionpublic java.util.Set getUsersWithTickets(boolean nonExpiredOnly)
getUsersWithTickets in class AbstractAuthenticationService
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.
AuthenticationExceptionpublic int countTickets(boolean nonExpiredOnly)
countTickets in class AbstractAuthenticationServicepublic int invalidateTickets(boolean expiredOnly)
invalidateTickets in class AbstractAuthenticationService
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.
AuthenticationException
public java.lang.String getCurrentTicket(java.lang.String sessionId)
throws AuthenticationException
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).
AuthenticationExceptionpublic 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 AuthenticationService
public void authenticateAsGuest()
throws AuthenticationException
AuthenticationService
authenticateAsGuest in interface AuthenticationServiceAuthenticationExceptionpublic boolean guestUserAuthenticationAllowed()
AuthenticationService
guestUserAuthenticationAllowed in interface AuthenticationServicepublic boolean getAllowsUserCreation()
public void setAllowsUserCreation(boolean allowsUserCreation)
public boolean getAllowsUserDeletion()
public void setAllowsUserDeletion(boolean allowsUserDeletion)
public boolean getAllowsUserPasswordChange()
public void setAllowsUserPasswordChange(boolean allowsUserPasswordChange)
public java.lang.String getDomain()
public void setDomain(java.lang.String domain)
public 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 AuthenticationServicepublic java.util.Set getTicketComponents()
getTicketComponents in class AbstractAuthenticationServicepublic java.util.Set getDefaultAdministratorUserNames()
getDefaultAdministratorUserNames in interface AuthenticationServicepublic java.util.Set getDefaultGuestUserNames()
getDefaultGuestUserNames in interface AuthenticationServicepublic boolean authenticationExists(java.lang.String userName)
authenticationExists in interface AuthenticationServiceuserName - the username
public boolean getAuthenticationEnabled(java.lang.String userName)
throws AuthenticationException
getAuthenticationEnabled in interface AuthenticationServiceAuthenticationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||