Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
▪ T
InMemoryAuthStorage
AuthStorage‹T›
▸ getData(): T | undefined
Implementation of AuthStorage
Defined in packages/auth-interceptor/src/storage/inMemory.authStorage.ts:6
Returns: T | undefined
▸ setData(data
: T): void
Implementation of AuthStorage
Defined in packages/auth-interceptor/src/storage/inMemory.authStorage.ts:10
Parameters:
Returns: void
↳ AuthError
Parameters:
Optional
cause• message: string
Defined in node_modules/typescript/lib/lib.es5.d.ts:974
• name: string
Defined in node_modules/typescript/lib/lib.es5.d.ts:973
Optional
stack• stack? : undefined | string
Defined in node_modules/typescript/lib/lib.es5.d.ts:975
Static
Error▪ Error: ErrorConstructor
Defined in node_modules/typescript/lib/lib.es5.d.ts:984
AuthInterceptorOptions
• canAuthorize: function
Defined in
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
This function is called when:
authorize() function throws an error,
a second call to an api endpoint results in 401.
Parameters:
• reauthorize: function
Obtain authorization data. At this point previous token has expired or Unauthorized response status code has been received. You can call refresh token endpoint.
• setAuthorizationData: function
Insert authorization data to the request.
param
Authorization data obtained earlier by {#authorize}
param
Request options
Parameters:
Ƭ Promisable: T | Promise‹T›
Ƭ QueueItem: object
fail(): function
(reason
: any): void
run(): function
(): Promise‹void›
Const
createAuthInterceptorParameters:
Const
createOAuth2InterceptorParameters:
▪ __namedParameters: object
Const
hasUnauthorizedResponseCode▸ hasUnauthorizedResponseCode(response
: HttpResponse): boolean
Parameters:
Returns: boolean
Const
isUnauthorizedError▸ isUnauthorizedError(error
: any): boolean
Parameters:
Returns: boolean
+ new AuthError(message
: string, cause?
: ):
Defined in
Returns:
• cause? :
Defined in
Inherited from .
Inherited from .
Inherited from .
Overrides .
Defined in
▸ (err
: ):
Defined in
▸ ():
Defined in
▸ (options
: NormalizedHttpOptions):
Defined in
Defined in
▸ createAuthInterceptor(options
: ): ‹›
Defined in
Returns: ‹›
▸ createOAuth2Interceptor(__namedParameters
: object): ‹›
Defined in
Returns: ‹›
Defined in
Defined in
Name
Type
data
T
Name | Type |
| NormalizedHttpOptions |
Name | Type |
| NormalizedHttpOptions |
Name | Type |
| HttpResponse |
Name | Type |
| any |
Name | Type |
| string |
|
Name | Type |
|
Name | Type |
|
Name | Type |
|
| function |
| object |
| function |
Simple queue that executes Promises one by one.
SimpleQueue
• get length(): number
Defined in packages/auth-interceptor/src/simpleQueue.ts:14
Returns: number
▸ clean(reason
: any): void
Defined in packages/auth-interceptor/src/simpleQueue.ts:36
Parameters:
Returns: void
▸ put<T>(item
: function): Promise‹T›
Defined in packages/auth-interceptor/src/simpleQueue.ts:21
Queues specified promise and returns when it's done
Type parameters:
▪ T
Parameters:
▪ item: function
▸ (): Promise‹T›
Returns: Promise‹T›
AuthInterceptor
HttpInterceptorInterface
+ new AuthInterceptor(options
: AuthInterceptorOptions): AuthInterceptor
Defined in packages/auth-interceptor/src/authInterceptor.ts:19
Parameters:
Returns: AuthInterceptor
• get pendingRequestCount(): number
Defined in packages/auth-interceptor/src/authInterceptor.ts:24
Returns: number
▸ onIntercept<Body>(request
: HttpFetch‹Body›, options
: NormalizedHttpOptions): HttpFetch‹Body›
Defined in packages/auth-interceptor/src/authInterceptor.ts:28
Type parameters:
▪ Body
Parameters:
Returns: HttpFetch‹Body›
▪ 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
OAuth2InterceptorOptions
• authStorage: ‹›
Defined in
Data storage for OAuth credentials. Uses InMemoryAuthStorage by default. One can implement their own storage, i.e. backed by Redux or LocalStorage.
• canAuthorize: function
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
clientId: string
clientSecret? : undefined | string
contentType? : ContentType
httpClientOptions: HttpClientConfig
refreshTokenUrl: string
• onAuthorizationFailure: function
This function is called when:
authorize() function throws an error,
a second call to an api endpoint results in 401.
Parameters:
OAuth2TokenResponse
• accessToken: string
Optional
expires• expires? : undefined | string
Optional
expiresIn• expiresIn? : undefined | string
Optional
idToken• idToken? : undefined | string
• refreshToken: string
Optional
scope• scope? : undefined | string
Optional
tokenType• tokenType? : undefined | string
‹›
Defined in
Defined in
Defined in
▸ (err
: ):
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in
Name
Type
reason
any
Name
Type
options
Name
Type
request
HttpFetch‹Body›
options
NormalizedHttpOptions
Name
Type
t
T
Name | Type |
| NormalizedHttpOptions |
Name | Type |
|