Class SecurityServiceSpringImpl
java.lang.Object
org.opencastproject.kernel.security.SecurityServiceSpringImpl
- All Implemented Interfaces:
SecurityService
A Spring Security implementation of
SecurityService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the organization associated with the current thread context.getUser()Gets the current user, or the local organization's anonymous user if the user has not been authenticated.Gets the current user's IP or null if unable to determine the User's IP.voidsetOrganization(Organization organization) Sets the organization for the calling thread.voidSets the current thread's user context to another user.voidSets the current thread's user's IP address.
-
Constructor Details
-
SecurityServiceSpringImpl
public SecurityServiceSpringImpl()
-
-
Method Details
-
getOrganization
Gets the organization associated with the current thread context.- Specified by:
getOrganizationin interfaceSecurityService- Returns:
- the organization
- See Also:
-
setOrganization
Sets the organization for the calling thread.- Specified by:
setOrganizationin interfaceSecurityService- Parameters:
organization- the organization- See Also:
-
getUser
Gets the current user, or the local organization's anonymous user if the user has not been authenticated.- Specified by:
getUserin interfaceSecurityService- Returns:
- the user
- Throws:
IllegalStateException- if no organization is set in the security context- See Also:
-
setUser
Sets the current thread's user context to another user. This is useful when spawning new threads that must contain the parent thread's user context.- Specified by:
setUserin interfaceSecurityService- Parameters:
user- the user to set for the current user context- See Also:
-
getUserIP
Description copied from interface:SecurityServiceGets the current user's IP or null if unable to determine the User's IP.- Specified by:
getUserIPin interfaceSecurityService- Returns:
- The current user's IP.
-
setUserIP
Description copied from interface:SecurityServiceSets the current thread's user's IP address.- Specified by:
setUserIPin interfaceSecurityService- Parameters:
userIP- The IP address of the user.
-