UNPKG

940 BTypeScriptView Raw
1import { InjectionToken } from '@angular/core';
2import { NbAuthToken, NbAuthTokenClass } from './token';
3import * as i0 from "@angular/core";
4export interface NbTokenPack {
5 name: string;
6 ownerStrategyName: string;
7 createdAt: Number;
8 value: string;
9}
10export declare const NB_AUTH_FALLBACK_TOKEN: InjectionToken<NbAuthTokenClass<NbAuthToken>>;
11/**
12 * Creates a token parcel which could be stored/restored
13 */
14export declare class NbAuthTokenParceler {
15 private fallbackClass;
16 private tokenClasses;
17 constructor(fallbackClass: NbAuthTokenClass, tokenClasses: NbAuthTokenClass[]);
18 wrap(token: NbAuthToken): string;
19 unwrap(value: string): NbAuthToken;
20 protected getClassByName(name: any): NbAuthTokenClass;
21 protected parseTokenPack(value: any): NbTokenPack;
22 static ɵfac: i0.ɵɵFactoryDeclaration<NbAuthTokenParceler, never>;
23 static ɵprov: i0.ɵɵInjectableDeclaration<NbAuthTokenParceler>;
24}