@idea-ionic/auth 6.12.3 → 6.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idea-ionic/auth",
3
- "version": "6.12.3",
3
+ "version": "6.13.0",
4
4
  "description": "IDEA Ionic auth flow",
5
5
  "dependencies": {
6
6
  "tslib": "^2.4.1"
@@ -7,14 +7,15 @@ import * as i5 from "./forgotPassword.page";
7
7
  import * as i6 from "./confirmPassword.page";
8
8
  import * as i7 from "./mfaChallenge.page";
9
9
  import * as i8 from "./setupMFA.page";
10
- import * as i9 from "@angular/common";
11
- import * as i10 from "@angular/forms";
12
- import * as i11 from "@ionic/angular";
13
- import * as i12 from "@idea-ionic/common";
14
- import * as i13 from "@angular/router";
15
- import * as i14 from "./setupMFA/setupMFA.module";
10
+ import * as i9 from "./passwordPolicy.component";
11
+ import * as i10 from "@angular/common";
12
+ import * as i11 from "@angular/forms";
13
+ import * as i12 from "@ionic/angular";
14
+ import * as i13 from "@idea-ionic/common";
15
+ import * as i14 from "@angular/router";
16
+ import * as i15 from "./setupMFA/setupMFA.module";
16
17
  export declare class IDEAAuthModule {
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEAAuthModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<IDEAAuthModule, [typeof i1.IDEASignInPage, typeof i2.IDEASignUpPage, typeof i3.IDEANewPasswordPage, typeof i4.IDEAResendLinkPage, typeof i5.IDEAForgotPasswordPage, typeof i6.IDEAConfirmPasswordPage, typeof i7.IDEAMFAChallengePage, typeof i8.IDEASetupMFAPage], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i11.IonicModule, typeof i12.IDEATranslationsModule, typeof i13.RouterModule, typeof i14.IDEASetupMFAModule], never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IDEAAuthModule, [typeof i1.IDEASignInPage, typeof i2.IDEASignUpPage, typeof i3.IDEANewPasswordPage, typeof i4.IDEAResendLinkPage, typeof i5.IDEAForgotPasswordPage, typeof i6.IDEAConfirmPasswordPage, typeof i7.IDEAMFAChallengePage, typeof i8.IDEASetupMFAPage, typeof i9.IDEAPasswordPolicyComponent], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i12.IonicModule, typeof i13.IDEATranslationsModule, typeof i14.RouterModule, typeof i15.IDEASetupMFAModule], never>;
19
20
  static ɵinj: i0.ɵɵInjectorDeclaration<IDEAAuthModule>;
20
21
  }
@@ -13,6 +13,7 @@ export declare class IDEAAuthService {
13
13
  private challengePassword;
14
14
  private newAccountJustRegistered;
15
15
  private mfaProjectName;
16
+ private passwordPolicy;
16
17
  constructor(storage: IDEAStorageService);
17
18
  /**
18
19
  * Prepare the necessary structure to get authorized in Cognito.
@@ -117,6 +118,16 @@ export declare class IDEAAuthService {
117
118
  * Update the currently logged in user's attributes.
118
119
  */
119
120
  updateUserAttributes(attributes: any): Promise<void>;
121
+ /**
122
+ * Validate the password against the policy set in the environments configuration.
123
+ * In case there are errors, they are returned as an array of strings.
124
+ */
125
+ validatePasswordAgainstPolicy(password: string): string[];
126
+ /**
127
+ * Get a complete password policy pattern, based on the environments configuration, to use on password input fields.
128
+ * Note: some of the symbols couldn't be included because unsupported by the input[pattern] attribute.
129
+ */
130
+ getPasswordPolicyPatternForInput(): string;
120
131
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEAAuthService, never>;
121
132
  static ɵprov: i0.ɵɵInjectableDeclaration<IDEAAuthService>;
122
133
  }
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { NavController } from '@ionic/angular';
2
+ import { NavController, PopoverController } from '@ionic/angular';
3
3
  import { ActivatedRoute } from '@angular/router';
4
4
  import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
5
5
  import { IDEAAuthService } from './auth.service';
@@ -7,17 +7,26 @@ import * as i0 from "@angular/core";
7
7
  export declare class IDEAConfirmPasswordPage implements OnInit {
8
8
  private navCtrl;
9
9
  private route;
10
+ private popoverCtrl;
10
11
  private message;
11
12
  private loading;
12
- private auth;
13
13
  private t;
14
+ auth: IDEAAuthService;
14
15
  email: string;
15
16
  newPassword: string;
16
17
  code: string;
18
+ passwordPolicy: {
19
+ minLength: number;
20
+ requireLowercase: boolean;
21
+ requireDigits: boolean;
22
+ requireSymbols: boolean;
23
+ requireUppercase: boolean;
24
+ };
17
25
  errorMsg: string;
18
- constructor(navCtrl: NavController, route: ActivatedRoute, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
26
+ constructor(navCtrl: NavController, route: ActivatedRoute, popoverCtrl: PopoverController, message: IDEAMessageService, loading: IDEALoadingService, t: IDEATranslationsService, auth: IDEAAuthService);
19
27
  ngOnInit(): void;
20
28
  confirmPassword(): Promise<void>;
29
+ openPasswordPolicy(event: Event): Promise<void>;
21
30
  goToForgotPassword(): void;
22
31
  goToAuth(): void;
23
32
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEAConfirmPasswordPage, never>;
@@ -1,19 +1,28 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { NavController } from '@ionic/angular';
2
+ import { NavController, PopoverController } from '@ionic/angular';
3
3
  import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
4
4
  import { IDEAAuthService } from './auth.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class IDEANewPasswordPage implements OnInit {
7
7
  private navCtrl;
8
+ private popoverCtrl;
8
9
  private message;
9
10
  private loading;
10
- private auth;
11
11
  private t;
12
+ auth: IDEAAuthService;
12
13
  newPassword: string;
14
+ passwordPolicy: {
15
+ minLength: number;
16
+ requireLowercase: boolean;
17
+ requireDigits: boolean;
18
+ requireSymbols: boolean;
19
+ requireUppercase: boolean;
20
+ };
13
21
  errorMsg: string;
14
- constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
22
+ constructor(navCtrl: NavController, popoverCtrl: PopoverController, message: IDEAMessageService, loading: IDEALoadingService, t: IDEATranslationsService, auth: IDEAAuthService);
15
23
  ngOnInit(): void;
16
24
  confirmNewPassword(): Promise<void>;
25
+ openPasswordPolicy(event: Event): Promise<void>;
17
26
  goToAuth(): void;
18
27
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEANewPasswordPage, never>;
19
28
  static ɵcmp: i0.ɵɵComponentDeclaration<IDEANewPasswordPage, "idea-new-password", never, {}, {}, never, never, false, never>;
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class IDEAPasswordPolicyComponent {
3
+ passwordPolicy: {
4
+ minLength: number;
5
+ requireLowercase: boolean;
6
+ requireDigits: boolean;
7
+ requireSymbols: boolean;
8
+ requireUppercase: boolean;
9
+ };
10
+ constructor();
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<IDEAPasswordPolicyComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<IDEAPasswordPolicyComponent, "idea-password-policy", never, {}, {}, never, never, false, never>;
13
+ }
@@ -6,8 +6,8 @@ export declare class IDEASignInPage {
6
6
  private navCtrl;
7
7
  private message;
8
8
  private loading;
9
- private auth;
10
9
  private t;
10
+ private auth;
11
11
  title: string;
12
12
  registrationPossible: boolean;
13
13
  hasIntroPage: boolean;
@@ -18,7 +18,7 @@ export declare class IDEASignInPage {
18
18
  newAccountRegistered: boolean;
19
19
  errorMsg: string;
20
20
  darkMode: boolean;
21
- constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
21
+ constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, t: IDEATranslationsService, auth: IDEAAuthService);
22
22
  ionViewDidEnter(): void;
23
23
  login(): Promise<void>;
24
24
  goToIntro(): void;
@@ -1,22 +1,31 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { NavController } from '@ionic/angular';
2
+ import { NavController, PopoverController } from '@ionic/angular';
3
3
  import { IDEAMessageService, IDEALoadingService, IDEATranslationsService } from '@idea-ionic/common';
4
4
  import { IDEAAuthService } from './auth.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class IDEASignUpPage implements OnInit {
7
7
  private navCtrl;
8
+ private popoverCtrl;
8
9
  private message;
9
10
  private loading;
10
- private auth;
11
11
  private t;
12
+ auth: IDEAAuthService;
12
13
  email: string;
13
14
  password: string;
14
15
  agreementsCheck: boolean;
16
+ passwordPolicy: {
17
+ minLength: number;
18
+ requireLowercase: boolean;
19
+ requireDigits: boolean;
20
+ requireSymbols: boolean;
21
+ requireUppercase: boolean;
22
+ };
15
23
  errorMsg: string;
16
- constructor(navCtrl: NavController, message: IDEAMessageService, loading: IDEALoadingService, auth: IDEAAuthService, t: IDEATranslationsService);
24
+ constructor(navCtrl: NavController, popoverCtrl: PopoverController, message: IDEAMessageService, loading: IDEALoadingService, t: IDEATranslationsService, auth: IDEAAuthService);
17
25
  ngOnInit(): void;
18
26
  register(): Promise<void>;
19
27
  translationExists(key: string): boolean;
28
+ openPasswordPolicy(event: Event): Promise<void>;
20
29
  goToResendLink(): void;
21
30
  goToAuth(): void;
22
31
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEASignUpPage, never>;