public interface SecurityService
| Modifier and Type | Method and Description |
|---|---|
Organization |
getOrganization()
Gets the organization associated with the current thread context.
|
User |
getUser()
Gets the current user, or the local organization's anonymous user if the user has not been authenticated.
|
String |
getUserIP()
Gets the current user's IP or null if unable to determine the User's IP.
|
void |
setOrganization(Organization organization)
Sets the organization for the calling thread.
|
void |
setUser(User user)
Sets the current thread's user context to another user.
|
void |
setUserIP(String userIP)
Sets the current thread's user's IP address.
|
User getUser() throws IllegalStateException
IllegalStateException - if no organization is set in the security contextOrganization getOrganization()
String getUserIP()
void setOrganization(Organization organization)
organization - the organizationvoid setUser(User user)
user - the user to set for the current user contextvoid setUserIP(String userIP)
userIP - The IP address of the user.Copyright © 2009–2021 Opencast Project. All rights reserved.