@terminus/ngx-tools
Version:
[![CircleCI][circle-badge]][circle-link] [![codecov][codecov-badge]][codecov-project] [![semantic-release][semantic-release-badge]][semantic-release] [![MIT License][license-image]][license-url] <br> [![NPM version][npm-version-image]][npm-url] [![Github
20 lines (19 loc) • 855 B
TypeScript
import { HttpClient } from '@angular/common/http';
import { Actions } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs';
import * as JwtActions from '../actions';
import { ClaimMap } from '../claim-map';
import { TokenExtractor } from './token-extractor';
export interface EscalateToken<CM = ClaimMap> extends Partial<JwtActions.StoreTokenConstructor<CM>> {
authorizeUrl: Observable<string>;
tokenName: Extract<keyof CM, string>;
}
export declare class TokenEscalator<CM = ClaimMap> {
actions$: Actions;
store: Store<any>;
http: HttpClient;
tokenExtractor: TokenExtractor<CM>;
escalateToken({ tokenName, authorizeUrl, isDefaultToken }: EscalateToken<CM>): Observable<any>;
constructor(actions$: Actions, store: Store<any>, http: HttpClient, tokenExtractor: TokenExtractor<CM>);
}