1 | import { HttpClient, HttpHeaders } from '@angular/common/http';
|
2 | import { ActivatedRoute } from '@angular/router';
|
3 | import { Observable } from 'rxjs';
|
4 | import { NbAuthStrategy } from '../auth-strategy';
|
5 | import { NbAuthRefreshableToken, NbAuthToken } from '../../services/token/token';
|
6 | import { NbAuthResult } from '../../services/auth-result';
|
7 | import { NbOAuth2AuthStrategyOptions } from './oauth2-strategy.options';
|
8 | import { NbAuthStrategyClass } from '../../auth.options';
|
9 | import * as i0 from "@angular/core";
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | export declare class NbOAuth2AuthStrategy extends NbAuthStrategy {
|
77 | protected http: HttpClient;
|
78 | protected route: ActivatedRoute;
|
79 | protected window: any;
|
80 | static setup(options: NbOAuth2AuthStrategyOptions): [NbAuthStrategyClass, NbOAuth2AuthStrategyOptions];
|
81 | get responseType(): any;
|
82 | get clientAuthMethod(): any;
|
83 | protected redirectResultHandlers: {
|
84 | [key: string]: Function;
|
85 | };
|
86 | protected redirectResults: {
|
87 | [key: string]: Function;
|
88 | };
|
89 | protected defaultOptions: NbOAuth2AuthStrategyOptions;
|
90 | constructor(http: HttpClient, route: ActivatedRoute, window: any);
|
91 | authenticate(data?: any): Observable<NbAuthResult>;
|
92 | getAuthorizationResult(): Observable<any>;
|
93 | refreshToken(token: NbAuthRefreshableToken): Observable<NbAuthResult>;
|
94 | passwordToken(username: string, password: string): Observable<NbAuthResult>;
|
95 | protected authorizeRedirect(): void;
|
96 | protected isRedirectResult(): Observable<boolean>;
|
97 | protected requestToken(code: string): Observable<NbAuthResult>;
|
98 | protected buildCodeRequestData(code: string): any;
|
99 | protected buildRefreshRequestData(token: NbAuthRefreshableToken): any;
|
100 | protected buildPasswordRequestData(username: string, password: string): string;
|
101 | protected buildAuthHeader(): HttpHeaders | undefined;
|
102 | protected getHeaders(): HttpHeaders;
|
103 | protected cleanParams(params: any): any;
|
104 | protected addCredentialsToParams(params: any): any;
|
105 | protected handleResponseError(res: any): Observable<NbAuthResult>;
|
106 | protected buildRedirectUrl(): string;
|
107 | protected parseHashAsQueryParams(hash: string): {
|
108 | [key: string]: string;
|
109 | };
|
110 | protected urlEncodeParameters(params: any): string;
|
111 | protected createRefreshedToken(res: any, existingToken: NbAuthRefreshableToken, requireValidToken: boolean): NbAuthToken;
|
112 | register(data?: any): Observable<NbAuthResult>;
|
113 | requestPassword(data?: any): Observable<NbAuthResult>;
|
114 | resetPassword(data?: any): Observable<NbAuthResult>;
|
115 | logout(): Observable<NbAuthResult>;
|
116 | static ɵfac: i0.ɵɵFactoryDeclaration<NbOAuth2AuthStrategy, never>;
|
117 | static ɵprov: i0.ɵɵInjectableDeclaration<NbOAuth2AuthStrategy>;
|
118 | }
|