UNPKG

1.22 kBTypeScriptView Raw
1import { HttpHeaders, HttpResponse } from '@angular/common/http';
2import { Observable } from 'rxjs';
3import { NbAuthResult } from '../services/auth-result';
4import { NbAuthStrategyOptions } from './auth-strategy-options';
5import { NbAuthToken } from '../services/token/token';
6export declare abstract class NbAuthStrategy {
7 protected defaultOptions: NbAuthStrategyOptions;
8 protected options: NbAuthStrategyOptions;
9 setOptions(options: any): void;
10 getOption(key: string): any;
11 createToken<T extends NbAuthToken>(value: any, failWhenInvalidToken?: boolean): T;
12 getName(): string;
13 abstract authenticate(data?: any): Observable<NbAuthResult>;
14 abstract register(data?: any): Observable<NbAuthResult>;
15 abstract requestPassword(data?: any): Observable<NbAuthResult>;
16 abstract resetPassword(data?: any): Observable<NbAuthResult>;
17 abstract logout(): Observable<NbAuthResult>;
18 abstract refreshToken(data?: any): Observable<NbAuthResult>;
19 protected createFailResponse(data?: any): HttpResponse<Object>;
20 protected createSuccessResponse(data?: any): HttpResponse<Object>;
21 protected getActionEndpoint(action: string): string;
22 protected getHeaders(): HttpHeaders;
23}