OAuth2InterceptorOptions
• authStorage: AuthStorage‹OAuth2TokenResponse›
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: 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
▸ (options
: NormalizedHttpOptions): boolean
Parameters:
• oauth: object
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:17
clientId: string
clientSecret? : undefined | string
contentType? : ContentType
httpClientOptions: HttpClientConfig
refreshTokenUrl: string
• 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.
▸ (err
: AuthError): Promisable
Parameters:
Name
Type
options
NormalizedHttpOptions
Name
Type
err