mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
104 lines
2.8 KiB
Java
104 lines
2.8 KiB
Java
package org.alfresco.repo.security.authentication;
|
|
|
|
import net.sf.acegisecurity.Authentication;
|
|
import net.sf.acegisecurity.UserDetails;
|
|
|
|
/**
|
|
* Low-level interface allowing control and retrieval of the authentication information held for the current thread.
|
|
*
|
|
* @author dward
|
|
*/
|
|
public interface AuthenticationContext
|
|
{
|
|
/**
|
|
* Remove the current security information
|
|
*/
|
|
public void clearCurrentSecurityContext();
|
|
|
|
/**
|
|
* Explicitly set the current suthentication. If the authentication is <tt>null</tt> the the current authentication
|
|
* is {@link #clearCurrentSecurityContext() cleared}.
|
|
*
|
|
* @param authentication
|
|
* the current authentication (may be <tt>null</tt>).
|
|
* @return Returns the modified authentication instance or <tt>null</tt> if it was cleared.
|
|
*/
|
|
public Authentication setCurrentAuthentication(Authentication authentication);
|
|
|
|
/**
|
|
* Explicitly set the given validated user details to be authenticated.
|
|
*
|
|
* @param ud
|
|
* the User Details
|
|
* @return Authentication
|
|
*/
|
|
public Authentication setUserDetails(UserDetails ud);
|
|
|
|
/**
|
|
* @throws AuthenticationException
|
|
*/
|
|
public Authentication getCurrentAuthentication() throws AuthenticationException;
|
|
|
|
/**
|
|
* Set the system user as the current user.
|
|
*/
|
|
public Authentication setSystemUserAsCurrentUser();
|
|
|
|
/**
|
|
* Set the system user as the current user.
|
|
*/
|
|
public Authentication setSystemUserAsCurrentUser(String tenantDomain);
|
|
|
|
/**
|
|
* Get the name of the system user. Note: for MT, will get system for default domain only
|
|
*/
|
|
public String getSystemUserName();
|
|
|
|
/**
|
|
* Get the name of the system user
|
|
*/
|
|
public String getSystemUserName(String tenantDomain);
|
|
|
|
/**
|
|
* True if this is the System user ?
|
|
*/
|
|
public boolean isSystemUserName(String userName);
|
|
|
|
/**
|
|
* Is the current user the system user?
|
|
*/
|
|
public boolean isCurrentUserTheSystemUser();
|
|
|
|
/**
|
|
* Get the name of the Guest User. Note: for MT, will get guest for default domain only
|
|
*/
|
|
public String getGuestUserName();
|
|
|
|
/**
|
|
* Get the name of the guest user
|
|
*/
|
|
public String getGuestUserName(String tenantDomain);
|
|
|
|
/**
|
|
* True if this is a guest user ?
|
|
*/
|
|
public boolean isGuestUserName(String userName);
|
|
|
|
/**
|
|
* Get the current user name.
|
|
*
|
|
* @throws AuthenticationException
|
|
*/
|
|
public String getCurrentUserName() throws AuthenticationException;
|
|
|
|
/**
|
|
* Extracts the tenant domain name from a user name
|
|
*
|
|
* @param userName
|
|
* a user name
|
|
* @return a tenant domain name
|
|
*/
|
|
public String getUserDomain(String userName);
|
|
|
|
}
|