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 SpotfirePrincipal.
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
    • getPrincipal

      @Deprecated public final SpotfirePrincipal getPrincipal()
      Deprecated.
      This method is deprecated and will be removed in a future release. Please use the UserDirectory to retrieve principals instead.
      Returns the SpotfirePrincipal instance representing the authenticated principal. This principal object can be used with the Spotfire Server User Directory API.
      Returns:
      the authenticated principal
      Since:
      3.0
    • toString

      public String toString()
      Overrides:
      toString in class Object