Astrada TypeScript SDK
    Preparing search index...

    Class AuthenticationClient

    Logs in with the client-credentials grant and caches the token until 30 seconds before it expires. Calls that need a token while one is being requested wait for that same request.

    Index
    • get grantedScope(): string

      The scopes the token endpoint said the cached token carries (space-separated), if it said.

      Returns string

    • Parameters

      • Optional_name: string
      • Optional_scopes: string[]

      Returns Promise<string>

    • Drops the cached token if it is the refused one; keeps a newer token or a login in flight.

      Parameters

      • refusedAuthorization: string

      Returns void