Frodo Library - v4.0.0-10
    Preparing search index...

    Type Alias Authenticate

    type Authenticate = {
        getAccessTokenForServiceAccount(
            saId?: string,
            saJwk?: JwkRsa,
        ): Promise<string>;
        getTokens(
            forceLoginAsUser?: boolean,
            autoRefresh?: boolean,
            types?: string[],
            callbackHandler?: CallbackHandler,
        ): Promise<Tokens>;
    }
    Index

    Methods

    • Get tokens and store them in State

      Parameters

      • OptionalforceLoginAsUser: boolean

        true to force login as user even if a service account or Amster account is available (default: false)

      • OptionalautoRefresh: boolean

        true to automatically refresh tokens before they expire (default: true)

      • Optionaltypes: string[]

        Array of supported deployment types. The function will throw an error if an unsupported type is detected (default: ['classic', 'cloud', 'forgeops'])

      • OptionalcallbackHandler: CallbackHandler

        function allowing the library to collect responses from the user through callbacks

      Returns Promise<Tokens>

      object containing the tokens

    Deprecated

    • Get access token for service account

      Parameters

      • OptionalsaId: string

        optional service account id

      • OptionalsaJwk: JwkRsa

        optional service account JWK

      Returns Promise<string>

      Access token or null

      since v2.0.0 use getTokens instead

      getTokens(): Promise<boolean>