public class AuthenticationContextImpl extends Object implements AuthenticationContext
Constructor and Description |
---|
AuthenticationContextImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clearCurrentSecurityContext()
Remove the current security information
|
net.sf.acegisecurity.Authentication |
getCurrentAuthentication() |
String |
getCurrentUserName()
Get the current user name.
|
String |
getGuestUserName()
Get the name of the Guest User.
|
String |
getGuestUserName(String tenantDomain)
Get the name of the guest user
|
String |
getSystemUserName()
Get the name of the system user.
|
String |
getSystemUserName(String tenantDomain)
Get the name of the system user
|
String |
getUserDomain(String userName)
Extracts the tenant domain name from a user name
|
boolean |
isCurrentUserTheSystemUser()
Is the current user the system user?
|
boolean |
isGuestUserName(String userName)
True if this is a guest user ?
|
boolean |
isSystemUserName(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(String tenantDomain)
Set the system user as the current user.
|
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
net.sf.acegisecurity.Authentication |
setUserDetails(net.sf.acegisecurity.UserDetails ud)
Explicitly set the given validated user details to be authenticated.
|
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public net.sf.acegisecurity.Authentication setUserDetails(net.sf.acegisecurity.UserDetails ud)
setUserDetails
in interface AuthenticationContext
ud
- the User Detailspublic net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser()
AuthenticationContext
setSystemUserAsCurrentUser
in interface AuthenticationContext
public net.sf.acegisecurity.Authentication setSystemUserAsCurrentUser(String tenantDomain)
AuthenticationContext
setSystemUserAsCurrentUser
in interface AuthenticationContext
public String getSystemUserName()
AuthenticationContext
getSystemUserName
in interface AuthenticationContext
public String getSystemUserName(String tenantDomain)
AuthenticationContext
getSystemUserName
in interface AuthenticationContext
public boolean isSystemUserName(String userName)
AuthenticationContext
isSystemUserName
in interface AuthenticationContext
public boolean isCurrentUserTheSystemUser()
AuthenticationContext
isCurrentUserTheSystemUser
in interface AuthenticationContext
public String getGuestUserName(String tenantDomain)
AuthenticationContext
getGuestUserName
in interface AuthenticationContext
public String getGuestUserName()
AuthenticationContext
getGuestUserName
in interface AuthenticationContext
public boolean isGuestUserName(String userName)
AuthenticationContext
isGuestUserName
in interface AuthenticationContext
public net.sf.acegisecurity.Authentication setCurrentAuthentication(net.sf.acegisecurity.Authentication authentication)
AuthenticationContext
cleared
.setCurrentAuthentication
in interface AuthenticationContext
authentication
- the current authentication (may be null).public net.sf.acegisecurity.Authentication getCurrentAuthentication() throws org.alfresco.repo.security.authentication.AuthenticationException
getCurrentAuthentication
in interface AuthenticationContext
AuthenticationException
public String getCurrentUserName() throws org.alfresco.repo.security.authentication.AuthenticationException
AuthenticationContext
getCurrentUserName
in interface AuthenticationContext
AuthenticationException
public void clearCurrentSecurityContext()
AuthenticationContext
clearCurrentSecurityContext
in interface AuthenticationContext
public String getUserDomain(String userName)
AuthenticationContext
getUserDomain
in interface AuthenticationContext
userName
- a user nameCopyright © 2005–2017 Alfresco Software. All rights reserved.