1 | import { Observable, BehaviorSubject } from 'rxjs';
|
2 | import { NbTokenStorage } from './token-storage';
|
3 | import { NbAuthToken } from './token';
|
4 | import * as i0 from "@angular/core";
|
5 |
|
6 |
|
7 |
|
8 | export declare class NbTokenService {
|
9 | protected tokenStorage: NbTokenStorage;
|
10 | protected token$: BehaviorSubject<NbAuthToken>;
|
11 | constructor(tokenStorage: NbTokenStorage);
|
12 | /**
|
13 | * Publishes token when it changes.
|
14 | * @returns {Observable<NbAuthToken>}
|
15 | */
|
16 | tokenChange(): Observable<NbAuthToken>;
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | set(token: NbAuthToken): Observable<null>;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | get(): Observable<NbAuthToken>;
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 | clear(): Observable<null>;
|
35 | protected publishStoredToken(): void;
|
36 | static ɵfac: i0.ɵɵFactoryDeclaration<NbTokenService, never>;
|
37 | static ɵprov: i0.ɵɵInjectableDeclaration<NbTokenService>;
|
38 | }
|