AuthInterceptorOptions
• canAuthorize: function
Defined in packages/auth-interceptor/src/authInterceptor.types.ts:30
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:
• onAuthorizationFailure: function
Defined in packages/auth-interceptor/src/authInterceptor.types.ts:24
This function is called when:
authorize() function throws an error,
a second call to an api endpoint results in 401.
▸ (err
: AuthError): Promisable
Parameters:
• reauthorize: function
Defined in packages/auth-interceptor/src/authInterceptor.types.ts:10
Obtain authorization data. At this point previous token has expired or Unauthorized response status code has been received. You can call refresh token endpoint.
▸ (): Promisable
• setAuthorizationData: function
Defined in packages/auth-interceptor/src/authInterceptor.types.ts:17
Insert authorization data to the request.
param
Authorization data obtained earlier by {#authorize}
param
Request options
▸ (options
: NormalizedHttpOptions): Promisable
Parameters:
Name
Type
options
NormalizedHttpOptions
Name
Type
err
Name
Type
options
NormalizedHttpOptions
▪ T
AuthStorage
▸ getData(): Promisable‹T | undefined›
Defined in packages/auth-interceptor/src/storage/authStorage.types.ts:4
Returns: Promisable‹T | undefined›
▸ setData(t
: T): Promisable
Defined in packages/auth-interceptor/src/storage/authStorage.types.ts:6
Parameters:
Returns: Promisable
Name
Type
t
T
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
OAuth2TokenResponse
• accessToken: string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:7
Optional
expires• expires? : undefined | string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:10
Optional
expiresIn• expiresIn? : undefined | string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:11
Optional
idToken• idToken? : undefined | string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:9
• refreshToken: string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:12
Optional
scope• scope? : undefined | string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:13
Optional
tokenType• tokenType? : undefined | string
Defined in packages/auth-interceptor/src/oauth2Interceptor.types.ts:8