public abstract class AbstractAuthenticationComponent extends java.lang.Object implements AuthenticationComponent
AuthenticationComponent.UserNameValidationMode| Constructor and Description |
|---|
AbstractAuthenticationComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(java.lang.String userName,
char[] password)
Authenticate
|
protected void |
authenticateImpl(java.lang.String userName,
char[] password)
Default unsupported authentication implementation - as of 2.1 this is the best way to implement your own
authentication component as it will support guest login - prior to this direct over ride for authenticate(String ,
char[]) was used.
|
void |
clearCurrentSecurityContext()
Remove the current security information
|
java.lang.Boolean |
getAllowGuestLogin() |
net.sf.acegisecurity.Authentication |
getCurrentAuthentication()
Get the current authentication context
|
java.lang.String |
getCurrentUserName()
Get the current user name.
|
java.util.Set |
getDefaultAdministratorUserNames()
Gets a set of user names who for this particular authentication system should be considered administrators by
default.
|
java.util.Set |
getDefaultGuestUserNames()
Gets a set of user names who for this particular authentication system should be considered guests by
default.
|
java.lang.String |
getGuestUserName()
Get the name of the Guest User note: for MT, will get guest for default domain only
|
java.lang.String |
getGuestUserName(java.lang.String tenantDomain)
Get the name of the guest user
|
org.alfresco.service.cmr.repository.NodeService |
getNodeService() |
PersonService |
getPersonService() |
java.lang.String |
getSystemUserName()
Get the name of the system user note: for MT, will get system for default domain only
|
java.lang.String |
getSystemUserName(java.lang.String tenantDomain)
Get the name of the system user
|
TransactionService |
getTransactionService() |
protected net.sf.acegisecurity.UserDetails |
getUserDetails(java.lang.String userName)
Default implementation that makes an ACEGI object on the fly
|
java.lang.String |
getUserDomain(java.lang.String userName)
Extracts the tenant domain name from a user name
|
boolean |
guestUserAuthenticationAllowed()
True if Guest user authentication is allowed, false otherwise
|
protected abstract boolean |
implementationAllowsGuestLogin() |
boolean |
isCurrentUserTheSystemUser()
Is the current user the system user?
|
boolean |
isGuestUserName(java.lang.String userName)
True if this is a guest user ?
|
boolean |
isSystemUserName(java.lang.String userName)
Is this the system user ?
|
void |
setAllowGuestLogin(java.lang.Boolean allowGuestLogin)
Set if guest login is supported.
|
void |
setAuthenticationContext(AuthenticationContext authenticationContext) |
net.sf.acegisecurity.Authentication |
setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
Explicitly set the current suthentication.
|
net.sf.acegisecurity.Authentication |
setCurrentUser(java.lang.String userName)
Explicitly set the current user to be authenticated.
|
net.sf.acegisecurity.Authentication |
setCurrentUser(java.lang.String userName,
AuthenticationComponent.UserNameValidationMode validationMode)
Explicitly set the current user to be authenticated.
|
void |
setDefaultAdministratorUserNameList(java.lang.String defaultAdministratorUserNames)
Convenience method to allow the administrator user names to be specified as a comma separated list
|
void |
setDefaultAdministratorUserNames(java.util.Set defaultAdministratorUserNames)
Sets the user names who for this particular authentication system should be considered administrators by default.
|
void |
setDefaultGuestUserNameList(java.lang.String defaultGuestUserNames)
Convenience method to allow the administrator user names to be specified as a comma separated list
|
void |
setDefaultGuestUserNames(java.util.Set defaultGuestUserNames)
Sets the user names who for this particular authentication system should be considered administrators by default.
|
net.sf.acegisecurity.Authentication |
setGuestUserAsCurrentUser()
Set the guest user as the current user.
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPersonService(PersonService personService) |
net.sf.acegisecurity.Authentication |
setSystemUserAsCurrentUser()
Set the system user as the current user note: for MT, will set to default domain only
|
net.sf.acegisecurity.Authentication |
setSystemUserAsCurrentUser(java.lang.String tenantDomain)
Set the system user as the current user.
|
void |
setTransactionService(TransactionService transactionService) |
net.sf.acegisecurity.Authentication |
setUserDetails(net.sf.acegisecurity.UserDetails ud)
Explicitly set the given validated user details to be authenticated.
|
void |
setUserRegistrySynchronizer(UserRegistrySynchronizer userRegistrySynchronizer) |
public void setAllowGuestLogin(java.lang.Boolean allowGuestLogin)
allowGuestLogin - public void setAuthenticationContext(AuthenticationContext authenticationContext)
public void setPersonService(PersonService personService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setTransactionService(TransactionService transactionService)
public void setUserRegistrySynchronizer(UserRegistrySynchronizer userRegistrySynchronizer)
public TransactionService getTransactionService()
public java.lang.Boolean getAllowGuestLogin()
public org.alfresco.service.cmr.repository.NodeService getNodeService()
public PersonService getPersonService()
public void authenticate(java.lang.String userName,
char[] password)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationComponentauthenticate in interface AuthenticationComponentAuthenticationExceptionprotected void authenticateImpl(java.lang.String userName,
char[] password)
userName - password - public net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationComponentsetCurrentUser in interface AuthenticationComponentorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName,
AuthenticationComponent.UserNameValidationMode validationMode)
AuthenticationComponentsetCurrentUser in interface AuthenticationComponentprotected net.sf.acegisecurity.UserDetails getUserDetails(java.lang.String userName)
userName - public net.sf.acegisecurity.Authentication setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
cleared.setCurrentAuthentication in interface AuthenticationContextauthentication - the current authentication (may be null).public net.sf.acegisecurity.Authentication getCurrentAuthentication()
throws org.alfresco.repo.security.authentication.AuthenticationException
getCurrentAuthentication in interface AuthenticationContextAuthenticationExceptionpublic java.lang.String getCurrentUserName()
throws org.alfresco.repo.security.authentication.AuthenticationException
getCurrentUserName in interface AuthenticationContextAuthenticationExceptionpublic net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser()
setSystemUserAsCurrentUser in interface AuthenticationContextpublic java.lang.String getSystemUserName()
getSystemUserName in interface AuthenticationContextpublic boolean isSystemUserName(java.lang.String userName)
isSystemUserName in interface AuthenticationContextpublic boolean isCurrentUserTheSystemUser()
isCurrentUserTheSystemUser in interface AuthenticationContextpublic java.lang.String getGuestUserName()
getGuestUserName in interface AuthenticationContextpublic java.lang.String getGuestUserName(java.lang.String tenantDomain)
AuthenticationContextgetGuestUserName in interface AuthenticationContextpublic net.sf.acegisecurity.Authentication setGuestUserAsCurrentUser()
throws org.alfresco.repo.security.authentication.AuthenticationException
setGuestUserAsCurrentUser in interface AuthenticationComponentorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic boolean isGuestUserName(java.lang.String userName)
AuthenticationContextisGuestUserName in interface AuthenticationContextprotected abstract boolean implementationAllowsGuestLogin()
public boolean guestUserAuthenticationAllowed()
AuthenticationComponentguestUserAuthenticationAllowed in interface AuthenticationComponentpublic void clearCurrentSecurityContext()
clearCurrentSecurityContext in interface AuthenticationContextpublic java.util.Set getDefaultAdministratorUserNames()
getDefaultAdministratorUserNames in interface AuthenticationComponentpublic void setDefaultAdministratorUserNames(java.util.Set defaultAdministratorUserNames)
defaultAdministratorUserNames - a set of user namespublic void setDefaultAdministratorUserNameList(java.lang.String defaultAdministratorUserNames)
defaultAdministratorUserNames - public java.util.Set getDefaultGuestUserNames()
getDefaultGuestUserNames in interface AuthenticationComponentpublic void setDefaultGuestUserNames(java.util.Set defaultGuestUserNames)
defaultAdministratorUserNames - a set of user namespublic void setDefaultGuestUserNameList(java.lang.String defaultGuestUserNames)
defaultAdministratorUserNames - public java.lang.String getSystemUserName(java.lang.String tenantDomain)
AuthenticationContextgetSystemUserName in interface AuthenticationContextpublic java.lang.String getUserDomain(java.lang.String userName)
AuthenticationContextgetUserDomain in interface AuthenticationContextuserName - a user namepublic net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser(java.lang.String tenantDomain)
AuthenticationContextsetSystemUserAsCurrentUser in interface AuthenticationContextpublic net.sf.acegisecurity.Authentication setUserDetails(net.sf.acegisecurity.UserDetails ud)
AuthenticationContextsetUserDetails in interface AuthenticationContextud - the User DetailsCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.