@igo2/auth 1.14.1 → 1.15.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/esm2020/lib/auth-form/auth-facebook.component.mjs +2 -2
- package/esm2020/lib/auth-form/auth-form.component.mjs +2 -2
- package/esm2020/lib/auth-form/auth-google.component.mjs +2 -2
- package/esm2020/lib/auth-form/auth-intern.component.mjs +2 -2
- package/esm2020/lib/auth-form/auth-microsoft.component.mjs +2 -2
- package/esm2020/lib/auth-form/auth-microsoftb2c.component.mjs +2 -2
- package/esm2020/lib/auth-routing.module.mjs +1 -1
- package/esm2020/lib/auth.module.mjs +1 -1
- package/esm2020/lib/shared/admin.guard.mjs +1 -1
- package/esm2020/lib/shared/auth-microsoft.provider.mjs +1 -1
- package/esm2020/lib/shared/auth-msalBroadcastServiceb2c.service.mjs +1 -1
- package/esm2020/lib/shared/auth-msalServiceb2c.service..mjs +1 -1
- package/esm2020/lib/shared/auth.guard.mjs +1 -1
- package/esm2020/lib/shared/auth.interceptor.mjs +1 -1
- package/esm2020/lib/shared/auth.interface.mjs +1 -1
- package/esm2020/lib/shared/auth.service.mjs +2 -4
- package/esm2020/lib/shared/logged.guard.mjs +1 -1
- package/esm2020/lib/shared/profils.guard.mjs +1 -1
- package/esm2020/lib/shared/protected.directive.mjs +1 -1
- package/esm2020/lib/shared/storage.interface.mjs +1 -1
- package/esm2020/lib/shared/storage.service.mjs +1 -1
- package/esm2020/lib/shared/token.service.mjs +1 -1
- package/esm2020/public_api.mjs +1 -1
- package/fesm2015/igo2-auth.mjs +7 -9
- package/fesm2015/igo2-auth.mjs.map +1 -1
- package/fesm2020/igo2-auth.mjs +7 -9
- package/fesm2020/igo2-auth.mjs.map +1 -1
- package/package.json +12 -8
package/fesm2020/igo2-auth.mjs
CHANGED
|
@@ -198,9 +198,7 @@ class AuthService {
|
|
|
198
198
|
this.languageService.setLanguage(tokenDecoded.user.locale);
|
|
199
199
|
}
|
|
200
200
|
if (tokenDecoded.user.isExpired) {
|
|
201
|
-
this.
|
|
202
|
-
.get('igo.auth.error.Password expired')
|
|
203
|
-
.subscribe((expiredAlert) => this.messageService.alert(expiredAlert));
|
|
201
|
+
this.messageService.alert('igo.auth.error.Password expired');
|
|
204
202
|
}
|
|
205
203
|
}
|
|
206
204
|
this.authenticate$.next(true);
|
|
@@ -311,7 +309,7 @@ AuthGoogleComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthGoo
|
|
|
311
309
|
} }, styles: ["[_nghost-%COMP%]{padding:10px 10px 10px 0;display:inline-block}.google-login-button[_ngcontent-%COMP%] .abcRioButton{color:#000000de}"], changeDetection: 0 });
|
|
312
310
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthGoogleComponent, [{
|
|
313
311
|
type: Component,
|
|
314
|
-
args: [{ selector: 'igo-auth-google', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"g-signin2 google-login-button\" data-height=\"40\" data-width=\"265\" data-longtitle=\"true\">\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block}.google-login-button ::ng-deep .abcRioButton{color:#000000de}\n"] }]
|
|
312
|
+
args: [{ selector: 'igo-auth-google', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"g-signin2 google-login-button\" data-height=\"40\" data-width=\"265\" data-longtitle=\"true\">\r\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block}.google-login-button ::ng-deep .abcRioButton{color:#000000de}\n"] }]
|
|
315
313
|
}], function () { return [{ type: AuthService }, { type: i2.ConfigService }, { type: i2.LanguageService }, { type: i0.ApplicationRef }]; }, { login: [{
|
|
316
314
|
type: Output
|
|
317
315
|
}] }); })();
|
|
@@ -417,7 +415,7 @@ AuthInternComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthInt
|
|
|
417
415
|
} }, dependencies: [i1$1.NgIf, i3$1.ɵNgNoValidate, i3$1.DefaultValueAccessor, i3$1.NgControlStatus, i3$1.NgControlStatusGroup, i3$1.RequiredValidator, i3$1.FormGroupDirective, i3$1.FormControlName, i5.MatFormField, i6.MatInput, i5$1.MatButton, i6$1.TranslatePipe], styles: [".full-width[_ngcontent-%COMP%]{width:100%}.anonymous[_ngcontent-%COMP%]{margin-left:10px}"] });
|
|
418
416
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthInternComponent, [{
|
|
419
417
|
type: Component,
|
|
420
|
-
args: [{ selector: 'igo-auth-intern', changeDetection: ChangeDetectionStrategy.Default, template: "<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\n <div>\n <mat-form-field class=\"full-width\">\n <input matInput required placeholder=\"{{'igo.auth.user' | translate}}\" formControlName=\"username\">\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field class=\"full-width\">\n <input matInput required type=\"password\" placeholder=\"{{'igo.auth.password' | translate}}\" formControlName=\"password\">\n </mat-form-field>\n </div>\n\n <button mat-raised-button type=\"submit\">{{'igo.auth.login' | translate}}</button>\n <button *ngIf=\"allowAnonymous\" mat-raised-button class=\"anonymous\" type=\"button\" [disabled]=\"loading\" (click)=\"loginAnonymous()\">\n {{'igo.auth.accessAnonymous' | translate }}\n </button>\n <div *ngIf=\"error\">\n <br/>\n <font size=\"3\" color=\"red\">{{error}}</font>\n </div>\n</form>\n\n<!--\nThis part was removed from the below line to fix Angular issue 30616 : [disabled]=\"!form.valid || loading\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid || loading\">{{'igo.auth.login' | translate}}</button>*/\n-->\n", styles: [".full-width{width:100%}.anonymous{margin-left:10px}\n"] }]
|
|
418
|
+
args: [{ selector: 'igo-auth-intern', changeDetection: ChangeDetectionStrategy.Default, template: "<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\r\n <div>\r\n <mat-form-field class=\"full-width\">\r\n <input matInput required placeholder=\"{{'igo.auth.user' | translate}}\" formControlName=\"username\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div>\r\n <mat-form-field class=\"full-width\">\r\n <input matInput required type=\"password\" placeholder=\"{{'igo.auth.password' | translate}}\" formControlName=\"password\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <button mat-raised-button type=\"submit\">{{'igo.auth.login' | translate}}</button>\r\n <button *ngIf=\"allowAnonymous\" mat-raised-button class=\"anonymous\" type=\"button\" [disabled]=\"loading\" (click)=\"loginAnonymous()\">\r\n {{'igo.auth.accessAnonymous' | translate }}\r\n </button>\r\n <div *ngIf=\"error\">\r\n <br/>\r\n <font size=\"3\" color=\"red\">{{error}}</font>\r\n </div>\r\n</form>\r\n\r\n<!--\r\nThis part was removed from the below line to fix Angular issue 30616 : [disabled]=\"!form.valid || loading\r\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid || loading\">{{'igo.auth.login' | translate}}</button>*/\r\n-->\r\n", styles: [".full-width{width:100%}.anonymous{margin-left:10px}\n"] }]
|
|
421
419
|
}], function () { return [{ type: AuthService }, { type: i2.LanguageService }, { type: i3$1.UntypedFormBuilder }]; }, { allowAnonymous: [{
|
|
422
420
|
type: Input
|
|
423
421
|
}], login: [{
|
|
@@ -476,7 +474,7 @@ AuthFacebookComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthF
|
|
|
476
474
|
} }, styles: ["[_nghost-%COMP%]{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-3px}"], changeDetection: 0 });
|
|
477
475
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthFacebookComponent, [{
|
|
478
476
|
type: Component,
|
|
479
|
-
args: [{ selector: 'igo-auth-facebook', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div scope=\"public_profile,email\"\n class=\"fb-login-button\" data-max-rows=\"1\" data-size=\"large\"\n data-button-type=\"login_with\" data-show-faces=\"false\"\n data-auto-logout-link=\"false\" data-use-continue-as=\"false\">\n</div>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-3px}\n"] }]
|
|
477
|
+
args: [{ selector: 'igo-auth-facebook', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div scope=\"public_profile,email\"\r\n class=\"fb-login-button\" data-max-rows=\"1\" data-size=\"large\"\r\n data-button-type=\"login_with\" data-show-faces=\"false\"\r\n data-auto-logout-link=\"false\" data-use-continue-as=\"false\">\r\n</div>\r\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-3px}\n"] }]
|
|
480
478
|
}], function () { return [{ type: AuthService }, { type: i2.ConfigService }, { type: i0.ApplicationRef }]; }, { login: [{
|
|
481
479
|
type: Output
|
|
482
480
|
}] }); })();
|
|
@@ -555,7 +553,7 @@ AuthMicrosoftComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Auth
|
|
|
555
553
|
} }, dependencies: [i4.MatIcon, i5$1.MatButton, i6$1.TranslatePipe], styles: ["[_nghost-%COMP%]{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}[_nghost-%COMP%] > button[_ngcontent-%COMP%]{font-size:15px;height:40px;width:265px}mat-icon[_ngcontent-%COMP%]{margin-right:10px}"], changeDetection: 0 });
|
|
556
554
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthMicrosoftComponent, [{
|
|
557
555
|
type: Component,
|
|
558
|
-
args: [{ selector: 'igo-auth-microsoft', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"microsoft-login-button\" mat-raised-button (click)=\"loginMicrosoft()\">\n <mat-icon svgIcon=\"microsoft\"></mat-icon>\n {{'igo.auth.microsoft.login' | translate}}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
|
|
556
|
+
args: [{ selector: 'igo-auth-microsoft', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"microsoft-login-button\" mat-raised-button (click)=\"loginMicrosoft()\">\r\n <mat-icon svgIcon=\"microsoft\"></mat-icon>\r\n {{'igo.auth.microsoft.login' | translate}}\r\n</button>\r\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
|
|
559
557
|
}], function () { return [{ type: AuthService }, { type: i2.ConfigService }, { type: i0.ApplicationRef }, { type: i3$2.MsalService }, { type: undefined, decorators: [{
|
|
560
558
|
type: Inject,
|
|
561
559
|
args: [MSAL_GUARD_CONFIG]
|
|
@@ -741,7 +739,7 @@ AuthMicrosoftb2cComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A
|
|
|
741
739
|
} }, dependencies: [i4.MatIcon, i5$1.MatButton, i6$1.TranslatePipe], styles: ["[_nghost-%COMP%]{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}[_nghost-%COMP%] > button[_ngcontent-%COMP%]{font-size:15px;height:40px;width:265px}mat-icon[_ngcontent-%COMP%]{margin-right:10px}"], changeDetection: 0 });
|
|
742
740
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthMicrosoftb2cComponent, [{
|
|
743
741
|
type: Component,
|
|
744
|
-
args: [{ selector: 'igo-auth-microsoftb2c', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"microsoft-login-button\" mat-raised-button (click)=\"loginMicrosoftb2c()\">\n <mat-icon svgIcon=\"microsoft\"></mat-icon>\n {{'igo.auth.microsoftb2c.login' | translate}}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
|
|
742
|
+
args: [{ selector: 'igo-auth-microsoftb2c', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"microsoft-login-button\" mat-raised-button (click)=\"loginMicrosoftb2c()\">\r\n <mat-icon svgIcon=\"microsoft\"></mat-icon>\r\n {{'igo.auth.microsoftb2c.login' | translate}}\r\n</button>\r\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
|
|
745
743
|
}], function () { return [{ type: AuthService }, { type: i2.ConfigService }, { type: i0.ApplicationRef }, { type: MsalServiceb2c }, { type: undefined, decorators: [{
|
|
746
744
|
type: Inject,
|
|
747
745
|
args: [MSAL_GUARD_CONFIG]
|
|
@@ -994,7 +992,7 @@ AuthFormComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthFormC
|
|
|
994
992
|
} }, dependencies: [i1$1.NgIf, i5$1.MatButton, AuthGoogleComponent, AuthInternComponent, AuthFacebookComponent, AuthMicrosoftComponent, AuthMicrosoftb2cComponent, i6$1.TranslatePipe], styles: ["[_nghost-%COMP%]{z-index:999}div.login[_ngcontent-%COMP%]{z-index:200;width:90%;min-width:360px;max-width:600px;padding:25px 50px;border:1px solid;background-color:#fff;border-color:#888}.center-block[_ngcontent-%COMP%]{position:fixed;top:20%;left:50%;transform:translate(-50%)}.backgroundDisable[_ngcontent-%COMP%]{position:fixed;top:0;left:0;background:#000;opacity:.8;z-index:100;height:100%;width:100%}"] });
|
|
995
993
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthFormComponent, [{
|
|
996
994
|
type: Component,
|
|
997
|
-
args: [{ selector: 'igo-auth-form', changeDetection: ChangeDetectionStrategy.Default, template: "<div *ngIf=\"visible\">\n <div *ngIf=\"!auth.logged && backgroundDisable\" class=\"backgroundDisable\"></div>\n\n <div *ngIf=\"!auth.logged && showLoginDiv\" class=\"login center-block\">\n <h1>{{'igo.auth.connection' | translate}}</h1>\n\n <igo-auth-google\n *ngIf=\"options.google && options.google.enabled !== false\"\n (login)=\"onLogin()\">\n </igo-auth-google>\n <igo-auth-microsoft\n *ngIf=\"options.microsoft && options.microsoft.enabled !== false\"\n (login)=\"onLogin()\">\n </igo-auth-microsoft>\n <igo-auth-microsoftb2c\n *ngIf=\"options.microsoftb2c && options.microsoftb2c.enabled !== false\"\n (login)=\"onLogin()\">\n </igo-auth-microsoftb2c>\n <igo-auth-facebook\n *ngIf=\"options.facebook && options.facebook.enabled !== false\"\n (login)=\"onLogin()\">\n </igo-auth-facebook>\n <igo-auth-intern\n *ngIf=\"!options.intern || options.intern.enabled !== false\"\n [allowAnonymous]=\"options.allowAnonymous\"\n (login)=\"onLogin()\">\n </igo-auth-intern>\n </div>\n\n <div *ngIf=\"auth.logged && showAlreadyConnectedDiv\" class=\"login center-block\">\n <p>{{'igo.auth.welcome' |\u00A0translate: user}}</p>\n <button mat-raised-button type=\"button\" (click)=\"logout()\">{{'igo.auth.signOut' |\u00A0translate}}</button>\n </div>\n\n <div *ngIf=\"showLogoutDiv\" class=\"login center-block\">\n <p>{{'igo.auth.deconnection' |\u00A0translate}}</p>\n <button *ngIf=\"options.homeRoute\" mat-raised-button type=\"button\" (click)=\"home()\">{{'igo.auth.home' |\u00A0translate}}</button>\n </div>\n\n</div>\n", styles: [":host{z-index:999}div.login{z-index:200;width:90%;min-width:360px;max-width:600px;padding:25px 50px;border:1px solid;background-color:#fff;border-color:#888}.center-block{position:fixed;top:20%;left:50%;transform:translate(-50%)}.backgroundDisable{position:fixed;top:0;left:0;background:#000;opacity:.8;z-index:100;height:100%;width:100%}\n"] }]
|
|
995
|
+
args: [{ selector: 'igo-auth-form', changeDetection: ChangeDetectionStrategy.Default, template: "<div *ngIf=\"visible\">\r\n <div *ngIf=\"!auth.logged && backgroundDisable\" class=\"backgroundDisable\"></div>\r\n\r\n <div *ngIf=\"!auth.logged && showLoginDiv\" class=\"login center-block\">\r\n <h1>{{'igo.auth.connection' | translate}}</h1>\r\n\r\n <igo-auth-google\r\n *ngIf=\"options.google && options.google.enabled !== false\"\r\n (login)=\"onLogin()\">\r\n </igo-auth-google>\r\n <igo-auth-microsoft\r\n *ngIf=\"options.microsoft && options.microsoft.enabled !== false\"\r\n (login)=\"onLogin()\">\r\n </igo-auth-microsoft>\r\n <igo-auth-microsoftb2c\r\n *ngIf=\"options.microsoftb2c && options.microsoftb2c.enabled !== false\"\r\n (login)=\"onLogin()\">\r\n </igo-auth-microsoftb2c>\r\n <igo-auth-facebook\r\n *ngIf=\"options.facebook && options.facebook.enabled !== false\"\r\n (login)=\"onLogin()\">\r\n </igo-auth-facebook>\r\n <igo-auth-intern\r\n *ngIf=\"!options.intern || options.intern.enabled !== false\"\r\n [allowAnonymous]=\"options.allowAnonymous\"\r\n (login)=\"onLogin()\">\r\n </igo-auth-intern>\r\n </div>\r\n\r\n <div *ngIf=\"auth.logged && showAlreadyConnectedDiv\" class=\"login center-block\">\r\n <p>{{'igo.auth.welcome' |\u00A0translate: user}}</p>\r\n <button mat-raised-button type=\"button\" (click)=\"logout()\">{{'igo.auth.signOut' |\u00A0translate}}</button>\r\n </div>\r\n\r\n <div *ngIf=\"showLogoutDiv\" class=\"login center-block\">\r\n <p>{{'igo.auth.deconnection' |\u00A0translate}}</p>\r\n <button *ngIf=\"options.homeRoute\" mat-raised-button type=\"button\" (click)=\"home()\">{{'igo.auth.home' |\u00A0translate}}</button>\r\n </div>\r\n\r\n</div>\r\n", styles: [":host{z-index:999}div.login{z-index:200;width:90%;min-width:360px;max-width:600px;padding:25px 50px;border:1px solid;background-color:#fff;border-color:#888}.center-block{position:fixed;top:20%;left:50%;transform:translate(-50%)}.backgroundDisable{position:fixed;top:0;left:0;background:#000;opacity:.8;z-index:100;height:100%;width:100%}\n"] }]
|
|
998
996
|
}], function () { return [{ type: AuthService }, { type: i2.ConfigService }, { type: i3.Router, decorators: [{
|
|
999
997
|
type: Optional
|
|
1000
998
|
}] }]; }, { backgroundDisable: [{
|