Authenticated user information including token, id_token and claims

Hierarchy

  • User
    • User

Constructors

  • Parameters

    • args: {
          access_token: string;
          expires_at?: number;
          id_token?: string;
          profile: IdTokenClaims;
          refresh_token?: string;
          scope?: string;
          session_state?: string;
          token_type: string;
          url_state?: string;
          userState?: unknown;
      }

    Returns User

Properties

access_token: string

The requested access token returned from the OIDC provider. The application can use this token to authenticate itself to the secured resource.

expires_at?: number

The expires at returned from the OIDC provider.

id_token?: string

A JSON Web Token (JWT). Only provided if openid scope was requested. The application can access the data decoded by using the profile property.

profile: IdTokenClaims

The claims represented by a combination of the id_token and the user info endpoint.

refresh_token?: string

An OAuth 2.0 refresh token. The app can use this token to acquire additional access tokens after the current access token expires. Refresh tokens are long-lived and can be used to maintain access to resources for extended periods of time.

scope?: string

The scopes that the requested access token is valid for.

session_state: string

The session state value returned from the OIDC provider.

state: unknown

custom state data set during the initial signin request

token_type: string

Typically "Bearer"

url_state?: string

Accessors

  • get expired(): boolean
  • Computed value indicating if the access token is expired.

    Returns boolean

  • get expires_in(): number
  • Computed number of seconds the access token has remaining.

    Returns number

  • set expires_in(value: number): void
  • Parameters

    • value: number

    Returns void

  • get scopes(): string[]
  • Array representing the parsed values from the scope.

    Returns string[]

Methods

  • Returns string

  • Parameters

    • storageString: string

    Returns User