@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.
@@ -5,7 +5,7 @@ import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angu
5
5
  import * as i3$1 from '@angular/common/http';
6
6
  import * as i3 from '@angular/router';
7
7
  import { RouterModule } from '@angular/router';
8
- import { fetchAuthSession, signIn, confirmSignIn, getCurrentUser, resetPassword, confirmResetPassword, signOut } from 'aws-amplify/auth';
8
+ import { getCurrentUser, fetchAuthSession, signIn, confirmSignIn, resetPassword, confirmResetPassword, signOut } from 'aws-amplify/auth';
9
9
  import * as i4 from 'ngx-toastr';
10
10
  import * as i4$1 from '@angular/common';
11
11
  import { CommonModule, NgOptimizedImage } from '@angular/common';
@@ -59,6 +59,7 @@ LoginConstant.setNewPasswordUrl = "/set-new-password";
59
59
  LoginConstant.forgortPasswordPageUrl = "/forgot-password";
60
60
  LoginConstant.verifyAndSetNewPasswordUrl = "/verify-and-set-new-password";
61
61
  LoginConstant.loginPageUrl = "/login";
62
+ LoginConstant.coPilotloginPageUrl = "/co-pilot-login";
62
63
  LoginConstant.welcomeScrreenUrl = "/welcome-screen";
63
64
  LoginConstant.homePageUrl = "/dashboard";
64
65
  LoginConstant.stationSettingUrl = "/station-settings";
@@ -98,7 +99,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
98
99
 
99
100
  // Angular import statements
100
101
  class AnnaLibAuthService {
101
- // authIdFromOktaRedirectionUrl: string;
102
102
  constructor(router, aclService, httpClient, toastr, consumingProjectAuthService, consumingProjectConfigService) {
103
103
  this.router = router;
104
104
  this.aclService = aclService;
@@ -114,33 +114,40 @@ class AnnaLibAuthService {
114
114
  }
115
115
  ngOnInit() { }
116
116
  async isUserLoggedIn() {
117
- const session = await fetchAuthSession();
118
- return new Promise((resolve, reject) => {
119
- if (session?.tokens) {
120
- this.getAllCognitoTokenAndGroups(session.tokens);
121
- resolve(true);
122
- }
123
- else {
124
- this.toastr.error(LoginConstant.sessionExpiredError);
125
- this.sessionTimeout();
117
+ let currentUser = await getCurrentUser();
118
+ if (currentUser) {
119
+ return new Promise(async (resolve, reject) => {
120
+ const session = await fetchAuthSession();
121
+ if (session?.tokens) {
122
+ this.IdToken = session?.tokens.idToken.toString();
123
+ this.getAllCognitoTokenAndGroups(session.tokens);
124
+ resolve(true);
125
+ }
126
+ else {
127
+ this.toastr.error(LoginConstant.sessionExpiredError);
128
+ this.sessionTimeout();
129
+ resolve(false);
130
+ }
131
+ });
132
+ }
133
+ else {
134
+ return new Promise((resolve) => {
135
+ clearInterval(this.accessTokenTimerId);
126
136
  resolve(false);
127
- }
128
- });
137
+ });
138
+ }
129
139
  }
130
140
  sessionTimeout() {
131
141
  localStorage.clear();
132
142
  clearInterval(this.accessTokenTimerId);
133
143
  this.router.navigate([LoginConstant.loginPageUrl]);
134
144
  }
135
- computeTokenExpiration(token) {
145
+ computeTokenExpiration(idToken) {
136
146
  let currentTime = Math.floor(Date.now() / 1000);
137
- let tokenTime = token.payload.exp;
147
+ let tokenTime = idToken.payload.exp;
138
148
  let expTime = (tokenTime - currentTime) * 1000;
139
149
  return expTime;
140
150
  }
141
- async getCurrentSession() {
142
- return await fetchAuthSession();
143
- }
144
151
  async handleSignIn({ username, password }) {
145
152
  try {
146
153
  const { isSignedIn, nextStep } = await signIn({ username, password });
@@ -151,8 +158,8 @@ class AnnaLibAuthService {
151
158
  localStorage.setItem("accessTokenExpiration", newExpTime.toString());
152
159
  this.refreshAccessToken();
153
160
  this.loginErrorMessage = null;
161
+ await this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(false);
154
162
  this.getAllCognitoTokenAndGroups(session.tokens);
155
- await this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(session.tokens.idToken.payload.sub);
156
163
  break;
157
164
  case "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED":
158
165
  this.consumingProjectAuthService.isLoggingIn = false;
@@ -190,46 +197,45 @@ class AnnaLibAuthService {
190
197
  }
191
198
  }
192
199
  refreshAccessToken() {
193
- // // let currentUser = this.getCurrentUserDetails();
194
- // let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
195
- // let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
196
- // this.accessTokenTimerId = setInterval(() => {
197
- // // let counter = 1000;
198
- // // let delayFunction = setTimeout(() => {
199
- // // currentUser && currentUser.getSession((error: any, token: CognitoUserSession | null) => {
200
- // let session = await fetchAuthSession();
201
- // if (session.tokens) {
202
- // this.getAllCognitoTokenAndGroups(session.tokens);
203
- // let newExpTime = this.computeTokenExpiration(this.IdToken);
204
- // if (newExpTime <= 0) {
205
- // newExpTime = 1000;
206
- // counter = 0;
207
- // if (delayFunction) {
208
- // clearInterval(delayFunction);
209
- // }
210
- // }
211
- // expTime = newExpTime;
212
- // localStorage.setItem("accessTokenExpiration", newExpTime.toString());
213
- // clearInterval(this.accessTokenTimerId);
214
- // this.refreshAccessToken();
215
- // } else if (error.code === "NotAuthorizedException") {
216
- // this.toastr.error(LoginConstant.sessionExpiredError);
217
- // this.sessionTimeout();
218
- // }
219
- // });
220
- // // }, counter);
221
- // // }, expTime);
200
+ let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
201
+ let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
202
+ this.accessTokenTimerId = setInterval(() => {
203
+ let counter = 1000;
204
+ let delayFunction = setTimeout(async () => {
205
+ try {
206
+ let session = await fetchAuthSession();
207
+ let token = session.tokens;
208
+ if (token) {
209
+ this.getAllCognitoTokenAndGroups(token);
210
+ let newExpTime = this.computeTokenExpiration(this.IdToken);
211
+ if (newExpTime <= 0) {
212
+ newExpTime = 1000;
213
+ counter = 0;
214
+ if (delayFunction) {
215
+ clearInterval(delayFunction);
216
+ }
217
+ }
218
+ expTime = newExpTime;
219
+ localStorage.setItem("accessTokenExpiration", newExpTime.toString());
220
+ clearInterval(this.accessTokenTimerId);
221
+ this.refreshAccessToken();
222
+ }
223
+ else {
224
+ this.toastr.error(LoginConstant.sessionExpiredError);
225
+ this.sessionTimeout();
226
+ }
227
+ }
228
+ catch (error) {
229
+ this.toastr.error(LoginConstant.sessionExpiredError);
230
+ this.sessionTimeout();
231
+ }
232
+ }, counter);
233
+ }, expTime);
222
234
  }
223
235
  async changePassword(newPassword) {
224
236
  try {
225
- let session = await fetchAuthSession();
226
- console.log(session);
227
- let oldPassword = this.userPassword;
228
237
  let inputParam = {
229
238
  challengeResponse: newPassword,
230
- options: {
231
- email: 'email@email'
232
- }
233
239
  };
234
240
  const data = await confirmSignIn(inputParam);
235
241
  const { username } = await getCurrentUser();
@@ -291,9 +297,6 @@ class AnnaLibAuthService {
291
297
  signInWithDuo() {
292
298
  this.consumingProjectAuthService.signInWithDuo();
293
299
  }
294
- signInWithCognito() {
295
- this.consumingProjectAuthService.signInWithCognito();
296
- }
297
300
  async handleSignOut() {
298
301
  try {
299
302
  await signOut({ global: false });
@@ -467,7 +470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
467
470
  args: [CONFIG_SERVICE_TOKEN]
468
471
  }] }]; } });
469
472
 
470
- class DuoSsoLoginComponent {
473
+ class SsoLoginComponent {
471
474
  constructor(authService, consumingProjectConfigService) {
472
475
  this.authService = authService;
473
476
  this.consumingProjectConfigService = consumingProjectConfigService;
@@ -478,15 +481,12 @@ class DuoSsoLoginComponent {
478
481
  signInWithSSO() {
479
482
  this.authService.signInWithDuo();
480
483
  }
481
- signInWithCognito() {
482
- this.authService.signInWithCognito();
483
- }
484
484
  }
485
- 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 });
486
- 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" }] });
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DuoSsoLoginComponent, decorators: [{
485
+ 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 });
486
+ 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" }] });
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SsoLoginComponent, decorators: [{
488
488
  type: Component,
489
- 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"] }]
489
+ 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"] }]
490
490
  }], ctorParameters: function () { return [{ type: AnnaLibAuthService }, { type: undefined, decorators: [{
491
491
  type: Inject,
492
492
  args: [CONFIG_SERVICE_TOKEN]
@@ -809,12 +809,12 @@ AnnaCognitoLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
809
809
  VersionAndTermPolicyComponent,
810
810
  SurewavesYearLogoComponent,
811
811
  PoweredByLogoTemplateComponent,
812
- DuoSsoLoginComponent], imports: [FormsModule,
812
+ SsoLoginComponent], imports: [FormsModule,
813
813
  ReactiveFormsModule,
814
814
  RouterModule,
815
815
  CommonModule,
816
816
  NgOptimizedImage], exports: [LoginComponent,
817
- DuoSsoLoginComponent,
817
+ SsoLoginComponent,
818
818
  SetNewPasswordComponent,
819
819
  PasswordMatchingComponent,
820
820
  ForgotPasswordComponent,
@@ -841,7 +841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
841
841
  VersionAndTermPolicyComponent,
842
842
  SurewavesYearLogoComponent,
843
843
  PoweredByLogoTemplateComponent,
844
- DuoSsoLoginComponent,
844
+ SsoLoginComponent,
845
845
  ],
846
846
  imports: [
847
847
  FormsModule,
@@ -852,7 +852,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
852
852
  ],
853
853
  exports: [
854
854
  LoginComponent,
855
- DuoSsoLoginComponent,
855
+ SsoLoginComponent,
856
856
  SetNewPasswordComponent,
857
857
  PasswordMatchingComponent,
858
858
  ForgotPasswordComponent,
@@ -891,5 +891,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
891
891
  * Generated bundle index. Do not edit.
892
892
  */
893
893
 
894
- 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 };
894
+ 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 };
895
895
  //# sourceMappingURL=annalib-anna-cognito-lib.mjs.map