name-password-strategy-option.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { NbAuthStrategyOptions } from '@nebular/auth';
  2. export interface NamePasswordStrategyModule {
  3. alwaysFail?: boolean;
  4. endpoint?: string;
  5. method?: string;
  6. redirect?: {
  7. success?: string | null;
  8. failure?: string | null;
  9. };
  10. defaultErrors?: string[];
  11. defaultMessages?: string[];
  12. }
  13. export interface NamePasswordStrategySuccess {
  14. key?: string;
  15. getter?: Function;
  16. }
  17. export interface NamePasswordStrategyMessage {
  18. key?: string;
  19. getter?: Function;
  20. }
  21. export declare class NamePasswordAuthStrategyOptions extends NbAuthStrategyOptions {
  22. baseEndpoint?: any;
  23. getPublicKey?: boolean | NamePasswordStrategyModule;
  24. login?: boolean | NamePasswordStrategyModule;
  25. createUser?: boolean | NamePasswordStrategyModule;
  26. updatePasswordForAdmin?: boolean | NamePasswordStrategyModule;
  27. register?: boolean | NamePasswordStrategyModule;
  28. requestPass?: boolean | NamePasswordStrategyModule;
  29. resetPass?: boolean | NamePasswordStrategyModule;
  30. logout?: boolean | NamePasswordStrategyModule;
  31. errors?: NamePasswordStrategyMessage;
  32. messages?: NamePasswordStrategyMessage;
  33. success?: NamePasswordStrategySuccess;
  34. validation?: {
  35. password?: {
  36. required?: boolean;
  37. minLength?: number | null;
  38. maxLength?: number | null;
  39. regexp?: string | null;
  40. };
  41. userName?: {
  42. required?: boolean;
  43. minLength?: number | null;
  44. maxLength?: number | null;
  45. regexp?: string | null;
  46. };
  47. };
  48. }
  49. export declare const namePasswordStrategyOptions: NamePasswordAuthStrategyOptions;