org.alfresco.repo.security.authentication
Interface AuthenticationContext

All Known Subinterfaces:
AuthenticationComponent, NLTMAuthenticator
All Known Implementing Classes:
AbstractAuthenticationComponent, AbstractChainingAuthenticationComponent, AuthenticationComponentImpl, AuthenticationContextImpl, ChainingAuthenticationComponentImpl, JAASAuthenticationComponent, LDAPAuthenticationComponentImpl, NTLMAuthenticationComponentImpl, SimpleAcceptOrRejectAllAuthenticationComponentImpl, SubsystemChainingAuthenticationComponent

public interface AuthenticationContext

Low-level interface allowing control and retrieval of the authentication information held for the current thread.


Method Summary
 void clearCurrentSecurityContext()
          Remove the current security information
 net.sf.acegisecurity.Authentication getCurrentAuthentication()
           
 java.lang.String getCurrentUserName()
          Get the current user name.
 java.lang.String getGuestUserName()
          Get the name of the Guest User.
 java.lang.String getGuestUserName(java.lang.String tenantDomain)
          Get the name of the guest user
 java.lang.String getSystemUserName()
          Get the name of the system user.
 java.lang.String getSystemUserName(java.lang.String tenantDomain)
          Get the name of the system user
 java.lang.String getUserDomain(java.lang.String userName)
          Extracts the tenant domain name from a user name
 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)
          True if this is the System user ?
 net.sf.acegisecurity.Authentication setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
          Explicitly set the current suthentication.
 net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser()
          Set the system user as the current user.
 net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser(java.lang.String tenantDomain)
          Set the system user as the current user.
 net.sf.acegisecurity.Authentication setUserDetails(net.sf.acegisecurity.UserDetails ud)
          Explicitly set the given validated user details to be authenticated.
 

Method Detail

clearCurrentSecurityContext

void clearCurrentSecurityContext()
Remove the current security information


setCurrentAuthentication

net.sf.acegisecurity.Authentication setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
Explicitly set the current suthentication. If the authentication is null the the current authentication is cleared.

Parameters:
authentication - the current authentication (may be null).
Returns:
Returns the modified authentication instance or null if it was cleared.

setUserDetails

net.sf.acegisecurity.Authentication setUserDetails(net.sf.acegisecurity.UserDetails ud)
Explicitly set the given validated user details to be authenticated.

Parameters:
ud - the User Details
Returns:
Authentication

getCurrentAuthentication

net.sf.acegisecurity.Authentication getCurrentAuthentication()
                                                             throws org.alfresco.repo.security.authentication.AuthenticationException
Throws:
AuthenticationException

setSystemUserAsCurrentUser

net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser()
Set the system user as the current user.


setSystemUserAsCurrentUser

net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser(java.lang.String tenantDomain)
Set the system user as the current user.


getSystemUserName

java.lang.String getSystemUserName()
Get the name of the system user. Note: for MT, will get system for default domain only


getSystemUserName

java.lang.String getSystemUserName(java.lang.String tenantDomain)
Get the name of the system user


isSystemUserName

boolean isSystemUserName(java.lang.String userName)
True if this is the System user ?


isCurrentUserTheSystemUser

boolean isCurrentUserTheSystemUser()
Is the current user the system user?


getGuestUserName

java.lang.String getGuestUserName()
Get the name of the Guest User. Note: for MT, will get guest for default domain only


getGuestUserName

java.lang.String getGuestUserName(java.lang.String tenantDomain)
Get the name of the guest user


isGuestUserName

boolean isGuestUserName(java.lang.String userName)
True if this is a guest user ?


getCurrentUserName

java.lang.String getCurrentUserName()
                                    throws org.alfresco.repo.security.authentication.AuthenticationException
Get the current user name.

Throws:
AuthenticationException

getUserDomain

java.lang.String getUserDomain(java.lang.String userName)
Extracts the tenant domain name from a user name

Parameters:
userName - a user name
Returns:
a tenant domain name


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.