@annalib/anna-cognito-lib 2.2.4 → 2.2.6

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injectable, Inject, Directive, Input, Component, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import { __awaiter } from 'tslib';
4
- import { fetchAuthSession, signIn, confirmSignIn, getCurrentUser, resetPassword, confirmResetPassword, signOut } from 'aws-amplify/auth';
4
+ import { getCurrentUser, fetchAuthSession, signIn, confirmSignIn, resetPassword, confirmResetPassword, signOut } from 'aws-amplify/auth';
5
5
  import * as i3 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import * as i3$1 from '@angular/common/http';
@@ -60,6 +60,7 @@ LoginConstant.setNewPasswordUrl = "/set-new-password";
60
60
  LoginConstant.forgortPasswordPageUrl = "/forgot-password";
61
61
  LoginConstant.verifyAndSetNewPasswordUrl = "/verify-and-set-new-password";
62
62
  LoginConstant.loginPageUrl = "/login";
63
+ LoginConstant.coPilotloginPageUrl = "/co-pilot-login";
63
64
  LoginConstant.welcomeScrreenUrl = "/welcome-screen";
64
65
  LoginConstant.homePageUrl = "/dashboard";
65
66
  LoginConstant.stationSettingUrl = "/station-settings";
@@ -100,7 +101,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
100
101
  } });
101
102
 
102
103
  class AnnaLibAuthService {
103
- // authIdFromOktaRedirectionUrl: string;
104
104
  constructor(router, aclService, httpClient, toastr, consumingProjectAuthService, consumingProjectConfigService) {
105
105
  this.router = router;
106
106
  this.aclService = aclService;
@@ -117,18 +117,28 @@ class AnnaLibAuthService {
117
117
  ngOnInit() { }
118
118
  isUserLoggedIn() {
119
119
  return __awaiter(this, void 0, void 0, function* () {
120
- const session = yield fetchAuthSession();
121
- return new Promise((resolve, reject) => {
122
- if (session === null || session === void 0 ? void 0 : session.tokens) {
123
- this.getAllCognitoTokenAndGroups(session.tokens);
124
- resolve(true);
125
- }
126
- else {
127
- this.toastr.error(LoginConstant.sessionExpiredError);
128
- this.sessionTimeout();
120
+ let currentUser = yield getCurrentUser();
121
+ if (currentUser) {
122
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
123
+ const session = yield fetchAuthSession();
124
+ if (session === null || session === void 0 ? void 0 : session.tokens) {
125
+ this.IdToken = session === null || session === void 0 ? void 0 : session.tokens.idToken.toString();
126
+ this.getAllCognitoTokenAndGroups(session.tokens);
127
+ resolve(true);
128
+ }
129
+ else {
130
+ this.toastr.error(LoginConstant.sessionExpiredError);
131
+ this.sessionTimeout();
132
+ resolve(false);
133
+ }
134
+ }));
135
+ }
136
+ else {
137
+ return new Promise((resolve) => {
138
+ clearInterval(this.accessTokenTimerId);
129
139
  resolve(false);
130
- }
131
- });
140
+ });
141
+ }
132
142
  });
133
143
  }
134
144
  sessionTimeout() {
@@ -136,17 +146,12 @@ class AnnaLibAuthService {
136
146
  clearInterval(this.accessTokenTimerId);
137
147
  this.router.navigate([LoginConstant.loginPageUrl]);
138
148
  }
139
- computeTokenExpiration(token) {
149
+ computeTokenExpiration(idToken) {
140
150
  let currentTime = Math.floor(Date.now() / 1000);
141
- let tokenTime = token.payload.exp;
151
+ let tokenTime = idToken.payload.exp;
142
152
  let expTime = (tokenTime - currentTime) * 1000;
143
153
  return expTime;
144
154
  }
145
- getCurrentSession() {
146
- return __awaiter(this, void 0, void 0, function* () {
147
- return yield fetchAuthSession();
148
- });
149
- }
150
155
  handleSignIn({ username, password }) {
151
156
  return __awaiter(this, void 0, void 0, function* () {
152
157
  try {
@@ -158,8 +163,8 @@ class AnnaLibAuthService {
158
163
  localStorage.setItem("accessTokenExpiration", newExpTime.toString());
159
164
  this.refreshAccessToken();
160
165
  this.loginErrorMessage = null;
166
+ yield this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(false);
161
167
  this.getAllCognitoTokenAndGroups(session.tokens);
162
- yield this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(session.tokens.idToken.payload.sub);
163
168
  break;
164
169
  case "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED":
165
170
  this.consumingProjectAuthService.isLoggingIn = false;
@@ -200,47 +205,46 @@ class AnnaLibAuthService {
200
205
  });
201
206
  }
202
207
  refreshAccessToken() {
203
- // // let currentUser = this.getCurrentUserDetails();
204
- // let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
205
- // let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
206
- // this.accessTokenTimerId = setInterval(() => {
207
- // // let counter = 1000;
208
- // // let delayFunction = setTimeout(() => {
209
- // // currentUser && currentUser.getSession((error: any, token: CognitoUserSession | null) => {
210
- // let session = await fetchAuthSession();
211
- // if (session.tokens) {
212
- // this.getAllCognitoTokenAndGroups(session.tokens);
213
- // let newExpTime = this.computeTokenExpiration(this.IdToken);
214
- // if (newExpTime <= 0) {
215
- // newExpTime = 1000;
216
- // counter = 0;
217
- // if (delayFunction) {
218
- // clearInterval(delayFunction);
219
- // }
220
- // }
221
- // expTime = newExpTime;
222
- // localStorage.setItem("accessTokenExpiration", newExpTime.toString());
223
- // clearInterval(this.accessTokenTimerId);
224
- // this.refreshAccessToken();
225
- // } else if (error.code === "NotAuthorizedException") {
226
- // this.toastr.error(LoginConstant.sessionExpiredError);
227
- // this.sessionTimeout();
228
- // }
229
- // });
230
- // // }, counter);
231
- // // }, expTime);
208
+ let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
209
+ let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
210
+ this.accessTokenTimerId = setInterval(() => {
211
+ let counter = 1000;
212
+ let delayFunction = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
213
+ try {
214
+ let session = yield fetchAuthSession();
215
+ let token = session.tokens;
216
+ if (token) {
217
+ this.getAllCognitoTokenAndGroups(token);
218
+ let newExpTime = this.computeTokenExpiration(this.IdToken);
219
+ if (newExpTime <= 0) {
220
+ newExpTime = 1000;
221
+ counter = 0;
222
+ if (delayFunction) {
223
+ clearInterval(delayFunction);
224
+ }
225
+ }
226
+ expTime = newExpTime;
227
+ localStorage.setItem("accessTokenExpiration", newExpTime.toString());
228
+ clearInterval(this.accessTokenTimerId);
229
+ this.refreshAccessToken();
230
+ }
231
+ else {
232
+ this.toastr.error(LoginConstant.sessionExpiredError);
233
+ this.sessionTimeout();
234
+ }
235
+ }
236
+ catch (error) {
237
+ this.toastr.error(LoginConstant.sessionExpiredError);
238
+ this.sessionTimeout();
239
+ }
240
+ }), counter);
241
+ }, expTime);
232
242
  }
233
243
  changePassword(newPassword) {
234
244
  return __awaiter(this, void 0, void 0, function* () {
235
245
  try {
236
- let session = yield fetchAuthSession();
237
- console.log(session);
238
- let oldPassword = this.userPassword;
239
246
  let inputParam = {
240
247
  challengeResponse: newPassword,
241
- options: {
242
- email: 'email@email'
243
- }
244
248
  };
245
249
  const data = yield confirmSignIn(inputParam);
246
250
  const { username } = yield getCurrentUser();
@@ -308,9 +312,6 @@ class AnnaLibAuthService {
308
312
  signInWithDuo() {
309
313
  this.consumingProjectAuthService.signInWithDuo();
310
314
  }
311
- signInWithCognito() {
312
- this.consumingProjectAuthService.signInWithCognito();
313
- }
314
315
  handleSignOut() {
315
316
  return __awaiter(this, void 0, void 0, function* () {
316
317
  try {
@@ -496,7 +497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
496
497
  }] }];
497
498
  } });
498
499
 
499
- class DuoSsoLoginComponent {
500
+ class SsoLoginComponent {
500
501
  constructor(authService, consumingProjectConfigService) {
501
502
  this.authService = authService;
502
503
  this.consumingProjectConfigService = consumingProjectConfigService;
@@ -507,15 +508,12 @@ class DuoSsoLoginComponent {
507
508
  signInWithSSO() {
508
509
  this.authService.signInWithDuo();
509
510
  }
510
- signInWithCognito() {
511
- this.authService.signInWithCognito();
512
- }
513
511
  }
514
- DuoSsoLoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DuoSsoLoginComponent, deps: [{ token: AnnaLibAuthService }, { token: CONFIG_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
515
- DuoSsoLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DuoSsoLoginComponent, selector: "anna-cognito-lib-duo-sso-login", ngImport: i0, template: "<div class=\"main\">\n <section *ngIf=\"constants.forgotPassword\">\n <header>\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\"\n alt=\"Anna Logo\" priority />\n </header>\n <article>\n <p class=\"sub-title\">Login</p>\n <p>Sign in to your account with SSO</p>\n <button class=\"login-btn\" (click)=\"signInWithSSO()\">Login</button>\n <div class=\"dashed-line\"></div>\n <!-- <a tabindex=\"4\" class=\"login-link\" [routerLink]=\"constants.loginPageUrl\">Sign in with username</a> -->\n </article>\n <footer>\n <anna-cognito-lib-powered-by-logo-template>\n </anna-cognito-lib-powered-by-logo-template>\n </footer>\n </section>\n</div>\n\n<div class=\"page-footer\">\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\n</div>", styles: ["@keyframes show{0%{opacity:0}50%{opacity:.5}to{opacity:1}}html{overflow-y:scroll}.main{background-color:#fff;background-size:cover;font-family:Roboto;height:calc(100vh - 50px)}section{top:45%;left:50%;position:absolute;transform:translate(-50%,-50%);width:20.875rem;animation:show .5s 1;-moz-animation:show .5s 1}.container{width:100%;height:100%;overflow:auto}header{height:auto;width:100%;text-align:center}article{margin-top:.9375rem;margin-bottom:.9375rem;border:1px solid #979797;background-color:#f4f4f4;padding:2rem 1.375rem;border-radius:.375rem;box-shadow:0 .125rem .4375rem #0000001a}article .sub-title{color:#6e6e6e;font-family:Roboto;font-size:1.25rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}article #heading{color:#212121;text-align:center;margin-bottom:1.5rem;font-family:Roboto;font-size:1.125rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}p{text-align:center;margin-bottom:1rem}#alert-div{padding:.25rem 0 0;margin-bottom:.75rem;border-radius:.25rem;border:solid 1px #f9b3ae;background-color:#fde4e3}#alert-div .material-icons{color:#f44336;font-size:1rem;margin-left:.5rem}#alert-div .mdi-info{color:#268bff;font-size:1rem}#alert-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}#info-div{padding:6px 0;margin-bottom:.75rem;border-radius:.25rem;border:1px solid #268bff;background:#e3f0ff}#info-div .mdi-info{color:#268bff;font-size:1rem;margin-left:6px}#info-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}footer{align-items:baseline;color:#6e6e6e;opacity:.9;display:flex;font-family:Ubuntu;font-size:1.25rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;justify-content:center}footer span{font-size:1.5625rem;margin-left:.25rem}input[type=password],input[type=text],input[type=number]{width:100%;height:30px;padding:.75rem 1rem;border:1px solid #979797;margin-bottom:.625rem;border-radius:.375rem}.login-btn{width:100%;height:2.5rem;border:0;color:#fff;background-color:#268bff;border-radius:.375rem;font-size:1rem}.login-btn:hover{background-color:#4099ff;cursor:pointer}.login-btn:disabled{background-color:#ccc;color:#fff;cursor:not-allowed}.input-invalid{border:1px solid #fe3824!important}input[type=password].ng-dirty.ng-invalid,input[type=text].ng-dirty.ng-invalid{border:1px solid #fe3824}input[type=submit]:focus,input[type=password]:focus,input[type=text]:focus,input[type=checkbox]:focus,button:focus{outline:none}input::placeholder{color:#a4a4a4}:host ::ng-deep .verison-and-policy{color:#8bac2a}\n"], dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }, { kind: "component", type: VersionAndTermPolicyComponent, selector: "anna-cognito-lib-version-and-term-policy" }, { kind: "component", type: SurewavesYearLogoComponent, selector: "anna-cognito-lib-surewaves-year-logo" }, { kind: "component", type: PoweredByLogoTemplateComponent, selector: "anna-cognito-lib-powered-by-logo-template" }] });
516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DuoSsoLoginComponent, decorators: [{
512
+ SsoLoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SsoLoginComponent, deps: [{ token: AnnaLibAuthService }, { token: CONFIG_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
513
+ SsoLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SsoLoginComponent, selector: "anna-cognito-lib-sso-login", ngImport: i0, template: "<div class=\"main\">\n <section *ngIf=\"constants.forgotPassword\">\n <header>\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\"\n alt=\"Anna Logo\" priority />\n </header>\n <article>\n <p class=\"sub-title\">Login</p>\n <p>Sign in to your account with SSO</p>\n <button class=\"login-btn\" (click)=\"signInWithSSO()\">Login</button>\n <div class=\"dashed-line\"></div>\n <!-- <a tabindex=\"4\" class=\"login-link\" [routerLink]=\"constants.loginPageUrl\">Sign in with username</a> -->\n </article>\n <footer>\n <anna-cognito-lib-powered-by-logo-template>\n </anna-cognito-lib-powered-by-logo-template>\n </footer>\n </section>\n</div>\n\n<div class=\"page-footer\">\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\n</div>", styles: ["@keyframes show{0%{opacity:0}50%{opacity:.5}to{opacity:1}}html{overflow-y:scroll}.main{background-color:#fff;background-size:cover;font-family:Roboto;height:calc(100vh - 50px)}section{top:45%;left:50%;position:absolute;transform:translate(-50%,-50%);width:20.875rem;animation:show .5s 1;-moz-animation:show .5s 1}.container{width:100%;height:100%;overflow:auto}header{height:auto;width:100%;text-align:center}article{margin-top:.9375rem;margin-bottom:.9375rem;border:1px solid #979797;background-color:#f4f4f4;padding:2rem 1.375rem;border-radius:.375rem;box-shadow:0 .125rem .4375rem #0000001a}article .sub-title{color:#6e6e6e;font-family:Roboto;font-size:1.25rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}article #heading{color:#212121;text-align:center;margin-bottom:1.5rem;font-family:Roboto;font-size:1.125rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}p{text-align:center;margin-bottom:1rem}#alert-div{padding:.25rem 0 0;margin-bottom:.75rem;border-radius:.25rem;border:solid 1px #f9b3ae;background-color:#fde4e3}#alert-div .material-icons{color:#f44336;font-size:1rem;margin-left:.5rem}#alert-div .mdi-info{color:#268bff;font-size:1rem}#alert-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}#info-div{padding:6px 0;margin-bottom:.75rem;border-radius:.25rem;border:1px solid #268bff;background:#e3f0ff}#info-div .mdi-info{color:#268bff;font-size:1rem;margin-left:6px}#info-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}footer{align-items:baseline;color:#6e6e6e;opacity:.9;display:flex;font-family:Ubuntu;font-size:1.25rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;justify-content:center}footer span{font-size:1.5625rem;margin-left:.25rem}input[type=password],input[type=text],input[type=number]{width:100%;height:30px;padding:.75rem 1rem;border:1px solid #979797;margin-bottom:.625rem;border-radius:.375rem}.login-btn{width:100%;height:2.5rem;border:0;color:#fff;background-color:#268bff;border-radius:.375rem;font-size:1rem}.login-btn:hover{background-color:#4099ff;cursor:pointer}.login-btn:disabled{background-color:#ccc;color:#fff;cursor:not-allowed}.input-invalid{border:1px solid #fe3824!important}input[type=password].ng-dirty.ng-invalid,input[type=text].ng-dirty.ng-invalid{border:1px solid #fe3824}input[type=submit]:focus,input[type=password]:focus,input[type=text]:focus,input[type=checkbox]:focus,button:focus{outline:none}input::placeholder{color:#a4a4a4}:host ::ng-deep .verison-and-policy{color:#8bac2a}\n"], dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "src", "srcset"] }, { kind: "component", type: VersionAndTermPolicyComponent, selector: "anna-cognito-lib-version-and-term-policy" }, { kind: "component", type: SurewavesYearLogoComponent, selector: "anna-cognito-lib-surewaves-year-logo" }, { kind: "component", type: PoweredByLogoTemplateComponent, selector: "anna-cognito-lib-powered-by-logo-template" }] });
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SsoLoginComponent, decorators: [{
517
515
  type: Component,
518
- args: [{ selector: 'anna-cognito-lib-duo-sso-login', template: "<div class=\"main\">\n <section *ngIf=\"constants.forgotPassword\">\n <header>\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\"\n alt=\"Anna Logo\" priority />\n </header>\n <article>\n <p class=\"sub-title\">Login</p>\n <p>Sign in to your account with SSO</p>\n <button class=\"login-btn\" (click)=\"signInWithSSO()\">Login</button>\n <div class=\"dashed-line\"></div>\n <!-- <a tabindex=\"4\" class=\"login-link\" [routerLink]=\"constants.loginPageUrl\">Sign in with username</a> -->\n </article>\n <footer>\n <anna-cognito-lib-powered-by-logo-template>\n </anna-cognito-lib-powered-by-logo-template>\n </footer>\n </section>\n</div>\n\n<div class=\"page-footer\">\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\n</div>", styles: ["@keyframes show{0%{opacity:0}50%{opacity:.5}to{opacity:1}}html{overflow-y:scroll}.main{background-color:#fff;background-size:cover;font-family:Roboto;height:calc(100vh - 50px)}section{top:45%;left:50%;position:absolute;transform:translate(-50%,-50%);width:20.875rem;animation:show .5s 1;-moz-animation:show .5s 1}.container{width:100%;height:100%;overflow:auto}header{height:auto;width:100%;text-align:center}article{margin-top:.9375rem;margin-bottom:.9375rem;border:1px solid #979797;background-color:#f4f4f4;padding:2rem 1.375rem;border-radius:.375rem;box-shadow:0 .125rem .4375rem #0000001a}article .sub-title{color:#6e6e6e;font-family:Roboto;font-size:1.25rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}article #heading{color:#212121;text-align:center;margin-bottom:1.5rem;font-family:Roboto;font-size:1.125rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}p{text-align:center;margin-bottom:1rem}#alert-div{padding:.25rem 0 0;margin-bottom:.75rem;border-radius:.25rem;border:solid 1px #f9b3ae;background-color:#fde4e3}#alert-div .material-icons{color:#f44336;font-size:1rem;margin-left:.5rem}#alert-div .mdi-info{color:#268bff;font-size:1rem}#alert-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}#info-div{padding:6px 0;margin-bottom:.75rem;border-radius:.25rem;border:1px solid #268bff;background:#e3f0ff}#info-div .mdi-info{color:#268bff;font-size:1rem;margin-left:6px}#info-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}footer{align-items:baseline;color:#6e6e6e;opacity:.9;display:flex;font-family:Ubuntu;font-size:1.25rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;justify-content:center}footer span{font-size:1.5625rem;margin-left:.25rem}input[type=password],input[type=text],input[type=number]{width:100%;height:30px;padding:.75rem 1rem;border:1px solid #979797;margin-bottom:.625rem;border-radius:.375rem}.login-btn{width:100%;height:2.5rem;border:0;color:#fff;background-color:#268bff;border-radius:.375rem;font-size:1rem}.login-btn:hover{background-color:#4099ff;cursor:pointer}.login-btn:disabled{background-color:#ccc;color:#fff;cursor:not-allowed}.input-invalid{border:1px solid #fe3824!important}input[type=password].ng-dirty.ng-invalid,input[type=text].ng-dirty.ng-invalid{border:1px solid #fe3824}input[type=submit]:focus,input[type=password]:focus,input[type=text]:focus,input[type=checkbox]:focus,button:focus{outline:none}input::placeholder{color:#a4a4a4}:host ::ng-deep .verison-and-policy{color:#8bac2a}\n"] }]
516
+ args: [{ selector: 'anna-cognito-lib-sso-login', template: "<div class=\"main\">\n <section *ngIf=\"constants.forgotPassword\">\n <header>\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\"\n alt=\"Anna Logo\" priority />\n </header>\n <article>\n <p class=\"sub-title\">Login</p>\n <p>Sign in to your account with SSO</p>\n <button class=\"login-btn\" (click)=\"signInWithSSO()\">Login</button>\n <div class=\"dashed-line\"></div>\n <!-- <a tabindex=\"4\" class=\"login-link\" [routerLink]=\"constants.loginPageUrl\">Sign in with username</a> -->\n </article>\n <footer>\n <anna-cognito-lib-powered-by-logo-template>\n </anna-cognito-lib-powered-by-logo-template>\n </footer>\n </section>\n</div>\n\n<div class=\"page-footer\">\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\n</div>", styles: ["@keyframes show{0%{opacity:0}50%{opacity:.5}to{opacity:1}}html{overflow-y:scroll}.main{background-color:#fff;background-size:cover;font-family:Roboto;height:calc(100vh - 50px)}section{top:45%;left:50%;position:absolute;transform:translate(-50%,-50%);width:20.875rem;animation:show .5s 1;-moz-animation:show .5s 1}.container{width:100%;height:100%;overflow:auto}header{height:auto;width:100%;text-align:center}article{margin-top:.9375rem;margin-bottom:.9375rem;border:1px solid #979797;background-color:#f4f4f4;padding:2rem 1.375rem;border-radius:.375rem;box-shadow:0 .125rem .4375rem #0000001a}article .sub-title{color:#6e6e6e;font-family:Roboto;font-size:1.25rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}article #heading{color:#212121;text-align:center;margin-bottom:1.5rem;font-family:Roboto;font-size:1.125rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}p{text-align:center;margin-bottom:1rem}#alert-div{padding:.25rem 0 0;margin-bottom:.75rem;border-radius:.25rem;border:solid 1px #f9b3ae;background-color:#fde4e3}#alert-div .material-icons{color:#f44336;font-size:1rem;margin-left:.5rem}#alert-div .mdi-info{color:#268bff;font-size:1rem}#alert-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}#info-div{padding:6px 0;margin-bottom:.75rem;border-radius:.25rem;border:1px solid #268bff;background:#e3f0ff}#info-div .mdi-info{color:#268bff;font-size:1rem;margin-left:6px}#info-div p{margin:-1.5625rem 0 0 1.8rem;padding:.3125rem 0;color:#4a4a4a;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal}footer{align-items:baseline;color:#6e6e6e;opacity:.9;display:flex;font-family:Ubuntu;font-size:1.25rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;justify-content:center}footer span{font-size:1.5625rem;margin-left:.25rem}input[type=password],input[type=text],input[type=number]{width:100%;height:30px;padding:.75rem 1rem;border:1px solid #979797;margin-bottom:.625rem;border-radius:.375rem}.login-btn{width:100%;height:2.5rem;border:0;color:#fff;background-color:#268bff;border-radius:.375rem;font-size:1rem}.login-btn:hover{background-color:#4099ff;cursor:pointer}.login-btn:disabled{background-color:#ccc;color:#fff;cursor:not-allowed}.input-invalid{border:1px solid #fe3824!important}input[type=password].ng-dirty.ng-invalid,input[type=text].ng-dirty.ng-invalid{border:1px solid #fe3824}input[type=submit]:focus,input[type=password]:focus,input[type=text]:focus,input[type=checkbox]:focus,button:focus{outline:none}input::placeholder{color:#a4a4a4}:host ::ng-deep .verison-and-policy{color:#8bac2a}\n"] }]
519
517
  }], ctorParameters: function () {
520
518
  return [{ type: AnnaLibAuthService }, { type: undefined, decorators: [{
521
519
  type: Inject,
@@ -848,12 +846,12 @@ AnnaCognitoLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
848
846
  VersionAndTermPolicyComponent,
849
847
  SurewavesYearLogoComponent,
850
848
  PoweredByLogoTemplateComponent,
851
- DuoSsoLoginComponent], imports: [FormsModule,
849
+ SsoLoginComponent], imports: [FormsModule,
852
850
  ReactiveFormsModule,
853
851
  RouterModule,
854
852
  CommonModule,
855
853
  NgOptimizedImage], exports: [LoginComponent,
856
- DuoSsoLoginComponent,
854
+ SsoLoginComponent,
857
855
  SetNewPasswordComponent,
858
856
  PasswordMatchingComponent,
859
857
  ForgotPasswordComponent,
@@ -880,7 +878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
880
878
  VersionAndTermPolicyComponent,
881
879
  SurewavesYearLogoComponent,
882
880
  PoweredByLogoTemplateComponent,
883
- DuoSsoLoginComponent,
881
+ SsoLoginComponent,
884
882
  ],
885
883
  imports: [
886
884
  FormsModule,
@@ -891,7 +889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
891
889
  ],
892
890
  exports: [
893
891
  LoginComponent,
894
- DuoSsoLoginComponent,
892
+ SsoLoginComponent,
895
893
  SetNewPasswordComponent,
896
894
  PasswordMatchingComponent,
897
895
  ForgotPasswordComponent,
@@ -932,5 +930,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
932
930
  * Generated bundle index. Do not edit.
933
931
  */
934
932
 
935
- export { ACL_SERVICE_TOKEN, AUTH_SERVICE_TOKEN, AnnaCognitoLibModule, AnnaConfigService, AnnaLibAclService, AnnaLibAuthService, CONFIG_SERVICE_TOKEN, DuoSsoLoginComponent, ForgotPasswordComponent, LoginComponent, LoginConstant, PasswordMatchingComponent, PoweredByLogoTemplateComponent, SetNewPasswordComponent, SpinnerButtonDirective, SurewavesYearLogoComponent, VerifyAndSetNewPasswordComponent, VersionAndTermPolicyComponent };
933
+ export { ACL_SERVICE_TOKEN, AUTH_SERVICE_TOKEN, AnnaCognitoLibModule, AnnaConfigService, AnnaLibAclService, AnnaLibAuthService, CONFIG_SERVICE_TOKEN, ForgotPasswordComponent, LoginComponent, LoginConstant, PasswordMatchingComponent, PoweredByLogoTemplateComponent, SetNewPasswordComponent, SpinnerButtonDirective, SsoLoginComponent, SurewavesYearLogoComponent, VerifyAndSetNewPasswordComponent, VersionAndTermPolicyComponent };
936
934
  //# sourceMappingURL=annalib-anna-cognito-lib.mjs.map