Class SecurityContext

java.lang.Object
com.spotfire.server.security.SecurityContext
All Implemented Interfaces:
Serializable

public class SecurityContext extends Object implements Serializable
The SecurityContext class contains information about an authenticated user.
Since:
3.0
See Also:
  • Constructor Details

    • SecurityContext

      public SecurityContext(String username, String domainName)
      Creates a new SecurityContext instance.
      Parameters:
      username - the username, must not be null or an empty string
      domainName - the domain name, must not be null or an empty string
      Since:
      5.0
    • SecurityContext

      public SecurityContext(String username, String domainName, String displayName, String emailAddress)
      Creates a new SecurityContext instance.
      Parameters:
      username - the username, must not be null or an empty string
      domainName - the domain name, must not be null or an empty string
      displayName - the user's display name, may be null but must not be an empty string
      emailAddress - the user's email address, may be null but must not be an empty string
      Since:
      6.5
  • Method Details

    • getUsername

      public final String getUsername()
      Returns the username of the authenticated principal.
      Returns:
      the username
      Since:
      7.8
    • getDomainName

      public final String getDomainName()
      Returns the domain name of the authenticated principal.
      Returns:
      the domain name
      Since:
      7.8
    • getDisplayName

      public final String getDisplayName()
      Returns the display name of the authenticated principal, or null if no display name has been set.
      Returns:
      the display name, or null if no display name has been set.
      Since:
      7.8
    • getEmailAddress

      public final String getEmailAddress()
      Returns the email address of the authenticated principal, or null if no email address has been set.
      Returns:
      the email address, or null if no email address has been set
      Since:
      7.8
    • toString

      public String toString()
      Overrides:
      toString in class Object