OAuth2InterceptorOptions

Hierarchy

  • OAuth2InterceptorOptions

Index

Properties

Properties

authStorage

authStorage: AuthStorageOAuth2TokenResponse

Data storage for OAuth credentials. Uses InMemoryAuthStorage by default. One can implement their own storage, i.e. backed by Redux or LocalStorage.

canAuthorize

canAuthorize: function

Determine if request should be processed, by checking request's options (i.e. check for a domain match)

param Request options

Type declaration:

▸ (options: NormalizedHttpOptions): boolean

Parameters:

oauth

oauth: object

Type declaration:

  • clientId: string

  • clientSecret? : undefined | string

  • contentType? : ContentType

  • httpClientOptions: HttpClientConfig

  • refreshTokenUrl: string

onAuthorizationFailure

onAuthorizationFailure: function

This function is called when:

  • authorize() function throws an error,

  • a second call to an api endpoint results in 401.

Type declaration:

▸ (err: AuthError): Promisable

Parameters:

Last updated