Package com.spotfire.server.security
Class SecurityContext
java.lang.Object
com.spotfire.server.security.SecurityContext
- All Implemented Interfaces:
Serializable
The
SecurityContext class contains information about an authenticated user.- Since:
- 3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityContext(String username, String domainName) Creates a newSecurityContextinstance.SecurityContext(String username, String domainName, String displayName, String emailAddress) Creates a newSecurityContextinstance. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the display name of the authenticated principal, ornullif no display name has been set.final StringReturns the domain name of the authenticated principal.final StringReturns the email address of the authenticated principal, ornullif no email address has been set.final StringReturns the username of the authenticated principal.toString()
-
Constructor Details
-
SecurityContext
Creates a newSecurityContextinstance.- Parameters:
username- the username, must not benullor an empty stringdomainName- the domain name, must not benullor an empty string- Since:
- 5.0
-
SecurityContext
Creates a newSecurityContextinstance.- Parameters:
username- the username, must not benullor an empty stringdomainName- the domain name, must not benullor an empty stringdisplayName- the user's display name, may benullbut must not be an empty stringemailAddress- the user's email address, may benullbut must not be an empty string- Since:
- 6.5
-
-
Method Details
-
getUsername
Returns the username of the authenticated principal.- Returns:
- the username
- Since:
- 7.8
-
getDomainName
Returns the domain name of the authenticated principal.- Returns:
- the domain name
- Since:
- 7.8
-
getDisplayName
Returns the display name of the authenticated principal, ornullif no display name has been set.- Returns:
- the display name, or
nullif no display name has been set. - Since:
- 7.8
-
getEmailAddress
Returns the email address of the authenticated principal, ornullif no email address has been set.- Returns:
- the email address, or
nullif no email address has been set - Since:
- 7.8
-
toString
-