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 newSecurityContext
instance.SecurityContext
(String username, String domainName, String displayName, String emailAddress) Creates a newSecurityContext
instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Returns the display name of the authenticated principal, ornull
if no display name has been set.final String
Returns the domain name of the authenticated principal.final String
Returns the email address of the authenticated principal, ornull
if no email address has been set.final String
Returns the username of the authenticated principal.toString()
-
Constructor Details
-
SecurityContext
Creates a newSecurityContext
instance.- Parameters:
username
- the username, must not benull
or an empty stringdomainName
- the domain name, must not benull
or an empty string- Since:
- 5.0
-
SecurityContext
Creates a newSecurityContext
instance.- Parameters:
username
- the username, must not benull
or an empty stringdomainName
- the domain name, must not benull
or an empty stringdisplayName
- the user's display name, may benull
but must not be an empty stringemailAddress
- the user's email address, may benull
but 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, ornull
if no display name has been set.- Returns:
- the display name, or
null
if no display name has been set. - Since:
- 7.8
-
getEmailAddress
Returns the email address of the authenticated principal, ornull
if no email address has been set.- Returns:
- the email address, or
null
if no email address has been set - Since:
- 7.8
-
toString
-