1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { NbAuthTokenClass } from '../../services/token/token';
|
7 | import { NbAuthStrategyOptions } from '../auth-strategy-options';
|
8 | export interface NbPasswordStrategyModule {
|
9 | alwaysFail?: boolean;
|
10 | endpoint?: string;
|
11 | method?: string;
|
12 | redirect?: {
|
13 | success?: string | null;
|
14 | failure?: string | null;
|
15 | };
|
16 | requireValidToken?: boolean;
|
17 | defaultErrors?: string[];
|
18 | defaultMessages?: string[];
|
19 | }
|
20 | export interface NbPasswordStrategyReset extends NbPasswordStrategyModule {
|
21 | resetPasswordTokenKey?: string;
|
22 | }
|
23 | export interface NbPasswordStrategyToken {
|
24 | class?: NbAuthTokenClass;
|
25 | key?: string;
|
26 | getter?: Function;
|
27 | }
|
28 | export interface NbPasswordStrategyMessage {
|
29 | key?: string;
|
30 | getter?: Function;
|
31 | }
|
32 | export declare class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
|
33 | baseEndpoint?: string;
|
34 | login?: boolean | NbPasswordStrategyModule;
|
35 | register?: boolean | NbPasswordStrategyModule;
|
36 | requestPass?: boolean | NbPasswordStrategyModule;
|
37 | resetPass?: boolean | NbPasswordStrategyReset;
|
38 | logout?: boolean | NbPasswordStrategyReset;
|
39 | refreshToken?: boolean | NbPasswordStrategyModule;
|
40 | token?: NbPasswordStrategyToken;
|
41 | errors?: NbPasswordStrategyMessage;
|
42 | messages?: NbPasswordStrategyMessage;
|
43 | validation?: {
|
44 | password?: {
|
45 | required?: boolean;
|
46 | minLength?: number | null;
|
47 | maxLength?: number | null;
|
48 | regexp?: string | null;
|
49 | };
|
50 | email?: {
|
51 | required?: boolean;
|
52 | regexp?: string | null;
|
53 | };
|
54 | fullName?: {
|
55 | required?: boolean;
|
56 | minLength?: number | null;
|
57 | maxLength?: number | null;
|
58 | regexp?: string | null;
|
59 | };
|
60 | };
|
61 | }
|
62 | export declare const passwordStrategyOptions: NbPasswordAuthStrategyOptions;
|