Class AuthenticationResult

Object
se.curity.identityserver.sdk.authentication.AuthenticationResult

public class AuthenticationResult extends Object
The result of a successful authentication.
Since:
2.1.0
  • Constructor Details

    • AuthenticationResult

      public AuthenticationResult(String subject)
      Create a simple authentication result using only the subject attribute.

      The authentication time is considered to be the instant at which this constructor was called.

      Parameters:
      subject - authenticated subject
    • AuthenticationResult

      public AuthenticationResult(AuthenticationAttributes attributes)
      Create a new Authentication result with the given authentication attributes.
      Parameters:
      attributes - authentication attributes
    • AuthenticationResult

      public AuthenticationResult(AuthenticationAttributes attributes, boolean useSessionCookieForSsoCookie)
      Creates a new authentication result with the given attributes and a flag indicating if if the authentication result should be session based (i.e., not persisted in browser after close). If true, this will cause all authentication results in the resulting SSO session (for this specific user) to become session based regardless of what is configured in the authentication profile.
      Since:
      5.3.0
  • Method Details

    • useSessionCookieForSsoCookie

      public boolean useSessionCookieForSsoCookie()
      Returns:
      true if the cookie should be session based only.
      Since:
      5.3.0
    • getAuthTime

      public Instant getAuthTime()
      Returns:
      instant at which authentication took place
    • getSubject

      public String getSubject()
    • getAttributes

      public AuthenticationAttributes getAttributes()