|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.security.authentication.AbstractAuthenticationComponent
public abstract class AbstractAuthenticationComponent
This class abstract the support required to set up and query the Acegi context for security enforcement. There are some simple default method implementations to support simple authentication.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent |
|---|
AuthenticationComponent.UserNameValidationMode |
| Constructor Summary | |
|---|---|
AbstractAuthenticationComponent()
|
|
| Method Summary | |
|---|---|
net.sf.acegisecurity.Authentication |
authenticate(net.sf.acegisecurity.Authentication token)
The default is not to support Authentication token base authentication |
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.lang.String |
getGuestUserName()
Get the name of the Guest User note: for MT, will get guest for default domain only |
java.lang.String |
getMD4HashedPassword(java.lang.String userName)
The should only be supported if getNTLMMode() is NTLMMode.MD4_PROVIDER. |
NodeService |
getNodeService()
|
NTLMMode |
getNTLMMode()
Get the NTML mode - none - supports MD4 hash to integrate - or it can asct as an NTLM authentication |
PersonService |
getPersonService()
|
java.lang.String |
getSystemUserName()
Get the name of the system user note: for MT, will get system for default domain only |
TransactionService |
getTransactionService()
|
protected net.sf.acegisecurity.UserDetails |
getUserDetails(java.lang.String userName)
Default implementation that makes an ACEGI object on the fly |
boolean |
guestUserAuthenticationAllowed()
True if Guest user authentication is allowed, false otherwise |
protected abstract boolean |
implementationAllowsGuestLogin()
|
boolean |
isSystemUserName(java.lang.String userName)
Is this the system user ? |
void |
setAllowGuestLogin(java.lang.Boolean allowGuestLogin)
Set if guest login is supported. |
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. |
net.sf.acegisecurity.Authentication |
setGuestUserAsCurrentUser()
Set the guest user as the current user. |
void |
setNodeService(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 |
void |
setTenantService(TenantService tenantService)
|
void |
setTransactionService(TransactionService transactionService)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAuthenticationComponent()
| Method Detail |
|---|
public void setAllowGuestLogin(java.lang.Boolean allowGuestLogin)
allowGuestLogin - public void setTenantService(TenantService tenantService)
public void setPersonService(PersonService personService)
public void setNodeService(NodeService nodeService)
public void setTransactionService(TransactionService transactionService)
public TransactionService getTransactionService()
public java.lang.Boolean getAllowGuestLogin()
public NodeService getNodeService()
public PersonService getPersonService()
public void authenticate(java.lang.String userName,
char[] password)
throws AuthenticationException
AuthenticationComponent
authenticate in interface AuthenticationComponentAuthenticationException
protected void authenticateImpl(java.lang.String userName,
char[] password)
userName - password -
public net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName,
AuthenticationComponent.UserNameValidationMode validationMode)
AuthenticationComponent
setCurrentUser in interface AuthenticationComponent
public net.sf.acegisecurity.Authentication setCurrentUser(java.lang.String userName)
throws AuthenticationException
AuthenticationComponent
setCurrentUser in interface AuthenticationComponentAuthenticationExceptionprotected 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 AuthenticationComponentauthentication - the current authentication (may be null).
public net.sf.acegisecurity.Authentication getCurrentAuthentication()
throws AuthenticationException
getCurrentAuthentication in interface AuthenticationComponentAuthenticationException
public java.lang.String getCurrentUserName()
throws AuthenticationException
getCurrentUserName in interface AuthenticationComponentAuthenticationExceptionpublic net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser()
setSystemUserAsCurrentUser in interface AuthenticationComponentpublic java.lang.String getSystemUserName()
getSystemUserName in interface AuthenticationComponentpublic boolean isSystemUserName(java.lang.String userName)
isSystemUserName in interface AuthenticationComponentpublic java.lang.String getGuestUserName()
getGuestUserName in interface AuthenticationComponent
public net.sf.acegisecurity.Authentication setGuestUserAsCurrentUser()
throws AuthenticationException
setGuestUserAsCurrentUser in interface AuthenticationComponentAuthenticationExceptionprotected abstract boolean implementationAllowsGuestLogin()
public boolean guestUserAuthenticationAllowed()
AuthenticationComponent
guestUserAuthenticationAllowed in interface AuthenticationComponentpublic void clearCurrentSecurityContext()
clearCurrentSecurityContext in interface AuthenticationComponent
public net.sf.acegisecurity.Authentication authenticate(net.sf.acegisecurity.Authentication token)
throws AuthenticationException
authenticate in interface AuthenticationComponenttoken - Authentication
AuthenticationExceptionpublic java.lang.String getMD4HashedPassword(java.lang.String userName)
getMD4HashedPassword in interface AuthenticationComponentpublic NTLMMode getNTLMMode()
getNTLMMode in interface AuthenticationComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||