OAuth2InterceptorOptions

Hierarchy

  • OAuth2InterceptorOptions

Index

Properties

Properties

authStorage

authStorage: AuthStorageOAuth2TokenResponse

Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:49

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

Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:62

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

Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:17

Type declaration:

  • clientId: string

  • clientSecret? : undefined | string

  • contentType? : ContentType

  • httpClientOptions: HttpClientConfig

  • refreshTokenUrl: string

onAuthorizationFailure

onAuthorizationFailure: function

Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:56

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