1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { NbAuthTokenClass } from '../../services/token/token';
|
7 | import { NbAuthStrategyOptions } from '../auth-strategy-options';
|
8 | export declare enum NbOAuth2ResponseType {
|
9 | CODE = "code",
|
10 | TOKEN = "token"
|
11 | }
|
12 | export declare enum NbOAuth2GrantType {
|
13 | AUTHORIZATION_CODE = "authorization_code",
|
14 | PASSWORD = "password",
|
15 | REFRESH_TOKEN = "refresh_token"
|
16 | }
|
17 | export declare enum NbOAuth2ClientAuthMethod {
|
18 | NONE = "none",
|
19 | BASIC = "basic",
|
20 | REQUEST_BODY = "request-body"
|
21 | }
|
22 | export declare class NbOAuth2AuthStrategyOptions extends NbAuthStrategyOptions {
|
23 | baseEndpoint?: string;
|
24 | clientId: string;
|
25 | clientSecret?: string;
|
26 | clientAuthMethod?: string;
|
27 | redirect?: {
|
28 | success?: string;
|
29 | failure?: string;
|
30 | };
|
31 | defaultErrors?: any[];
|
32 | defaultMessages?: any[];
|
33 | authorize?: {
|
34 | endpoint?: string;
|
35 | redirectUri?: string;
|
36 | responseType?: string;
|
37 | requireValidToken?: boolean;
|
38 | scope?: string;
|
39 | state?: string;
|
40 | params?: {
|
41 | [key: string]: string;
|
42 | };
|
43 | };
|
44 | token?: {
|
45 | endpoint?: string;
|
46 | grantType?: string;
|
47 | redirectUri?: string;
|
48 | scope?: string;
|
49 | requireValidToken?: boolean;
|
50 | class: NbAuthTokenClass;
|
51 | };
|
52 | refresh?: {
|
53 | endpoint?: string;
|
54 | grantType?: string;
|
55 | scope?: string;
|
56 | requireValidToken?: boolean;
|
57 | };
|
58 | }
|
59 | export declare const auth2StrategyOptions: NbOAuth2AuthStrategyOptions;
|