Gaunt Sloth Assistant
    Preparing search index...

    Please note most of these "unused" methods are part of OAuthClientProvider

    Implements

    • OAuthClientProvider
    Index

    Constructors

    Accessors

    • get clientMetadata(): {
          client_name?: string;
          client_uri?: string;
          contacts?: string[];
          grant_types?: string[];
          jwks?: any;
          jwks_uri?: string;
          logo_uri?: string;
          policy_uri?: string;
          redirect_uris: string[];
          response_types?: string[];
          scope?: string;
          software_id?: string;
          software_statement?: string;
          software_version?: string;
          token_endpoint_auth_method?: string;
          tos_uri?: string;
      }

      Metadata about this OAuth client.

      Returns {
          client_name?: string;
          client_uri?: string;
          contacts?: string[];
          grant_types?: string[];
          jwks?: any;
          jwks_uri?: string;
          logo_uri?: string;
          policy_uri?: string;
          redirect_uris: string[];
          response_types?: string[];
          scope?: string;
          software_id?: string;
          software_statement?: string;
          software_version?: string;
          token_endpoint_auth_method?: string;
          tos_uri?: string;
      }

    • get redirectUrl(): string

      The URL to redirect the user agent to after authorization.

      Returns string

    Methods

    • Loads information about this OAuth client, as registered already with the server, or returns undefined if the client is not registered with the server.

      Returns Promise<
          | undefined
          | {
              client_id: string;
              client_id_issued_at?: number;
              client_name?: string;
              client_secret?: string;
              client_secret_expires_at?: number;
              client_uri?: string;
              contacts?: string[];
              grant_types?: string[];
              jwks?: any;
              jwks_uri?: string;
              logo_uri?: string;
              policy_uri?: string;
              redirect_uris: string[];
              response_types?: string[];
              scope?: string;
              software_id?: string;
              software_statement?: string;
              software_version?: string;
              token_endpoint_auth_method?: string;
              tos_uri?: string;
          },
      >

    • Loads the PKCE code verifier for the current session, necessary to validate the authorization result.

      Returns Promise<string>

    • Invoked to redirect the user agent to the given URL to begin the authorization flow.

      Parameters

      • authUrl: URL

      Returns Promise<void>

    • If implemented, this permits the OAuth client to dynamically register with the server. Client information saved this way should later be read via clientInformation().

      This method is not required to be implemented if client information is statically known (e.g., pre-registered).

      Parameters

      • clientInformation: {
            client_id: string;
            client_id_issued_at?: number;
            client_name?: string;
            client_secret?: string;
            client_secret_expires_at?: number;
            client_uri?: string;
            contacts?: string[];
            grant_types?: string[];
            jwks?: any;
            jwks_uri?: string;
            logo_uri?: string;
            policy_uri?: string;
            redirect_uris: string[];
            response_types?: string[];
            scope?: string;
            software_id?: string;
            software_statement?: string;
            software_version?: string;
            token_endpoint_auth_method?: string;
            tos_uri?: string;
        }

      Returns Promise<void>

    • Saves a PKCE code verifier for the current session, before redirecting to the authorization flow.

      Parameters

      • codeVerifier: string

      Returns Promise<void>

    • Stores new OAuth tokens for the current session, after a successful authorization.

      Parameters

      • tokens: {
            access_token: string;
            expires_in?: number;
            id_token?: string;
            refresh_token?: string;
            scope?: string;
            token_type: string;
        }

      Returns Promise<void>

    • Returns a OAuth2 state parameter.

      Returns string | Promise<string>

    • Loads any existing OAuth tokens for the current session, or returns undefined if there are no saved tokens.

      Returns
          | undefined
          | {
              access_token: string;
              expires_in?: number;
              id_token?: string;
              refresh_token?: string;
              scope?: string;
              token_type: string;
          }