@annalib/anna-cognito-lib 2.0.11 → 2.1.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/components/login/login.component.mjs +7 -4
- package/esm2020/lib/components/set-new-password/set-new-password.component.mjs +2 -2
- package/esm2020/lib/config/auth-service.token.mjs +1 -1
- package/esm2020/lib/services/auth.service.mjs +174 -182
- package/fesm2015/annalib-anna-cognito-lib.mjs +200 -183
- package/fesm2015/annalib-anna-cognito-lib.mjs.map +1 -1
- package/fesm2020/annalib-anna-cognito-lib.mjs +207 -211
- package/fesm2020/annalib-anna-cognito-lib.mjs.map +1 -1
- package/lib/components/login/login.component.d.ts +1 -0
- package/lib/config/auth-service.token.d.ts +1 -0
- package/lib/services/auth.service.d.ts +16 -27
- package/package.json +3 -2
|
@@ -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 {
|
|
4
|
+
import { fetchAuthSession, signIn, confirmSignIn, getCurrentUser, 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';
|
|
@@ -69,30 +69,6 @@ const CONFIG_SERVICE_TOKEN = new InjectionToken('Cognito config service token');
|
|
|
69
69
|
/** Token to inject the auth service */
|
|
70
70
|
const AUTH_SERVICE_TOKEN = new InjectionToken('Auth service token');
|
|
71
71
|
|
|
72
|
-
class AuthenticationData {
|
|
73
|
-
constructor(Username, Password) {
|
|
74
|
-
this.Username = Username;
|
|
75
|
-
this.Password = Password;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
class UserPoolInformation {
|
|
79
|
-
constructor(UserPoolId, ClientId) {
|
|
80
|
-
this.UserPoolId = UserPoolId;
|
|
81
|
-
this.ClientId = ClientId;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
class UsernameInfo {
|
|
85
|
-
constructor(object) {
|
|
86
|
-
this.isUsernameAvailable = object.isUsernameAvailable;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
class UserState {
|
|
90
|
-
constructor(userState) {
|
|
91
|
-
this.userStatus = userState;
|
|
92
|
-
this.isUserWithTempPassword = userState == 'FORCE_CHANGE_PASSWORD';
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
72
|
/** Token to inject the acl service */
|
|
97
73
|
const ACL_SERVICE_TOKEN = new InjectionToken('ACL service token');
|
|
98
74
|
|
|
@@ -123,6 +99,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
123
99
|
} });
|
|
124
100
|
|
|
125
101
|
class AnnaLibAuthService {
|
|
102
|
+
// authIdFromOktaRedirectionUrl: string;
|
|
126
103
|
constructor(router, aclService, httpClient, toastr, consumingProjectAuthService, consumingProjectConfigService) {
|
|
127
104
|
this.router = router;
|
|
128
105
|
this.aclService = aclService;
|
|
@@ -137,171 +114,178 @@ class AnnaLibAuthService {
|
|
|
137
114
|
}
|
|
138
115
|
}
|
|
139
116
|
ngOnInit() { }
|
|
140
|
-
/***
|
|
141
|
-
1. takes user pool data (userPool ID and client ID)
|
|
142
|
-
2. if current user is null then it means user already logged out then simply return Promise<false>
|
|
143
|
-
3. if current user present check if token is valid for it.
|
|
144
|
-
*/
|
|
145
117
|
isUserLoggedIn() {
|
|
146
|
-
|
|
147
|
-
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const session = yield fetchAuthSession();
|
|
148
120
|
return new Promise((resolve, reject) => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
return new Promise((resolve) => {
|
|
164
|
-
clearInterval(this.accessTokenTimerId);
|
|
165
|
-
resolve(false);
|
|
121
|
+
if (session === null || session === void 0 ? void 0 : session.tokens) {
|
|
122
|
+
this.getAllCognitoTokenAndGroups(session.tokens);
|
|
123
|
+
resolve(true);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.toastr.error(LoginConstant.sessionExpiredError);
|
|
127
|
+
this.sessionTimeout();
|
|
128
|
+
resolve(false);
|
|
129
|
+
}
|
|
166
130
|
});
|
|
167
|
-
}
|
|
131
|
+
});
|
|
168
132
|
}
|
|
169
133
|
sessionTimeout() {
|
|
170
134
|
localStorage.clear();
|
|
171
135
|
clearInterval(this.accessTokenTimerId);
|
|
172
136
|
this.router.navigate([LoginConstant.loginPageUrl]);
|
|
173
137
|
}
|
|
174
|
-
refreshAccessToken() {
|
|
175
|
-
let currentUser = this.getCurrentUserDetails();
|
|
176
|
-
let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
|
|
177
|
-
let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
|
|
178
|
-
this.accessTokenTimerId = setInterval(() => {
|
|
179
|
-
let counter = 1000;
|
|
180
|
-
let delayFunction = setTimeout(() => {
|
|
181
|
-
currentUser && currentUser.getSession((error, token) => {
|
|
182
|
-
if (token) {
|
|
183
|
-
this.getAllCognitoTokenAndGroups(token);
|
|
184
|
-
let newExpTime = this.computeTokenExpiration(this.IdToken);
|
|
185
|
-
if (newExpTime <= 0) {
|
|
186
|
-
newExpTime = 1000;
|
|
187
|
-
counter = 0;
|
|
188
|
-
if (delayFunction) {
|
|
189
|
-
clearInterval(delayFunction);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
expTime = newExpTime;
|
|
193
|
-
localStorage.setItem("accessTokenExpiration", newExpTime.toString());
|
|
194
|
-
clearInterval(this.accessTokenTimerId);
|
|
195
|
-
this.refreshAccessToken();
|
|
196
|
-
}
|
|
197
|
-
else if (error.code === "NotAuthorizedException") {
|
|
198
|
-
this.toastr.error(LoginConstant.sessionExpiredError);
|
|
199
|
-
this.sessionTimeout();
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}, counter);
|
|
203
|
-
}, expTime);
|
|
204
|
-
}
|
|
205
138
|
computeTokenExpiration(token) {
|
|
206
139
|
let currentTime = Math.floor(Date.now() / 1000);
|
|
207
140
|
let tokenTime = token.payload.exp;
|
|
208
141
|
let expTime = (tokenTime - currentTime) * 1000;
|
|
209
142
|
return expTime;
|
|
210
143
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
getCognitoUserDetails(email) {
|
|
217
|
-
this.poolData = new UserPoolInformation(this.consumingProjectConfigService.appGenericConfig.cognito.userPoolId, this.consumingProjectConfigService.appGenericConfig.cognito.clientId);
|
|
218
|
-
this.userPool = new CognitoUserPool(this.poolData);
|
|
219
|
-
let userData = {
|
|
220
|
-
Username: email,
|
|
221
|
-
Pool: this.userPool,
|
|
222
|
-
};
|
|
223
|
-
let cognitoUser = new CognitoUser(userData);
|
|
224
|
-
return cognitoUser;
|
|
144
|
+
getCurrentSession() {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
return yield fetchAuthSession();
|
|
147
|
+
});
|
|
225
148
|
}
|
|
226
|
-
|
|
227
|
-
this
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
149
|
+
handleSignIn({ username, password }) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
try {
|
|
152
|
+
const { isSignedIn, nextStep } = yield signIn({ username, password });
|
|
153
|
+
switch (nextStep === null || nextStep === void 0 ? void 0 : nextStep.signInStep) {
|
|
154
|
+
case "DONE":
|
|
155
|
+
let session = yield fetchAuthSession();
|
|
156
|
+
let newExpTime = this.computeTokenExpiration(session.tokens.idToken);
|
|
157
|
+
localStorage.setItem("accessTokenExpiration", newExpTime.toString());
|
|
158
|
+
this.refreshAccessToken();
|
|
159
|
+
this.loginErrorMessage = null;
|
|
160
|
+
this.getAllCognitoTokenAndGroups(session.tokens);
|
|
161
|
+
yield this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(session.tokens.idToken.payload.sub);
|
|
162
|
+
break;
|
|
163
|
+
case "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED":
|
|
164
|
+
this.consumingProjectAuthService.isLoggingIn = false;
|
|
165
|
+
this.userName = username;
|
|
166
|
+
this.router.navigate([LoginConstant.setNewPasswordUrl]);
|
|
167
|
+
this.setNewPasswordErrorMessage = null;
|
|
168
|
+
break;
|
|
169
|
+
case "RESET_PASSWORD":
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
243
174
|
this.consumingProjectAuthService.isLoggingIn = false;
|
|
244
|
-
if (
|
|
175
|
+
if ((error === null || error === void 0 ? void 0 : error.message) == LoginConstant.tempPasswordExpiryError) {
|
|
245
176
|
this.loginErrorMessage = LoginConstant.tempPasswordOnExpiryErrorMsg;
|
|
246
|
-
this.consumingProjectAuthService.sendRegenerationEmail(
|
|
177
|
+
this.consumingProjectAuthService.sendRegenerationEmail(username);
|
|
247
178
|
}
|
|
248
|
-
else if (
|
|
179
|
+
else if ((error === null || error === void 0 ? void 0 : error.message) === "Password attempts exceeded") {
|
|
249
180
|
this.loginErrorMessage = LoginConstant.attemptLimitExceeded;
|
|
250
181
|
}
|
|
251
182
|
else {
|
|
252
183
|
this.loginErrorMessage = LoginConstant.userNamePasswordIncorrect;
|
|
253
184
|
}
|
|
254
|
-
}
|
|
255
|
-
newPasswordRequired: (data) => {
|
|
256
|
-
this.consumingProjectAuthService.isLoggingIn = false;
|
|
257
|
-
this.userAttribute = data;
|
|
258
|
-
this.router.navigate([LoginConstant.setNewPasswordUrl]);
|
|
259
|
-
},
|
|
185
|
+
}
|
|
260
186
|
});
|
|
261
187
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
188
|
+
getAllCognitoTokenAndGroups(token) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
this.accessToken = token.accessToken.toString();
|
|
191
|
+
this.IdToken = token.idToken;
|
|
192
|
+
if ("cognito:groups" in token.accessToken.payload) {
|
|
193
|
+
let userGroupsInCognitoJWT = token.accessToken.payload["cognito:groups"];
|
|
194
|
+
this.aclService.userGroupsInCognitoJWT = userGroupsInCognitoJWT;
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
this.aclService.userGroupsInCognitoJWT = [];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
refreshAccessToken() {
|
|
202
|
+
// // let currentUser = this.getCurrentUserDetails();
|
|
203
|
+
// let accessTokenExpiration = localStorage.getItem("accessTokenExpiration");
|
|
204
|
+
// let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;
|
|
205
|
+
// this.accessTokenTimerId = setInterval(() => {
|
|
206
|
+
// // let counter = 1000;
|
|
207
|
+
// // let delayFunction = setTimeout(() => {
|
|
208
|
+
// // currentUser && currentUser.getSession((error: any, token: CognitoUserSession | null) => {
|
|
209
|
+
// let session = await fetchAuthSession();
|
|
210
|
+
// if (session.tokens) {
|
|
211
|
+
// this.getAllCognitoTokenAndGroups(session.tokens);
|
|
212
|
+
// let newExpTime = this.computeTokenExpiration(this.IdToken);
|
|
213
|
+
// if (newExpTime <= 0) {
|
|
214
|
+
// newExpTime = 1000;
|
|
215
|
+
// counter = 0;
|
|
216
|
+
// if (delayFunction) {
|
|
217
|
+
// clearInterval(delayFunction);
|
|
218
|
+
// }
|
|
219
|
+
// }
|
|
220
|
+
// expTime = newExpTime;
|
|
221
|
+
// localStorage.setItem("accessTokenExpiration", newExpTime.toString());
|
|
222
|
+
// clearInterval(this.accessTokenTimerId);
|
|
223
|
+
// this.refreshAccessToken();
|
|
224
|
+
// } else if (error.code === "NotAuthorizedException") {
|
|
225
|
+
// this.toastr.error(LoginConstant.sessionExpiredError);
|
|
226
|
+
// this.sessionTimeout();
|
|
227
|
+
// }
|
|
228
|
+
// });
|
|
229
|
+
// // }, counter);
|
|
230
|
+
// // }, expTime);
|
|
231
|
+
}
|
|
232
|
+
changePassword(newPassword) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
try {
|
|
235
|
+
let session = yield fetchAuthSession();
|
|
236
|
+
console.log(session);
|
|
237
|
+
let oldPassword = this.userPassword;
|
|
238
|
+
let inputParam = {
|
|
239
|
+
challengeResponse: newPassword,
|
|
240
|
+
options: {
|
|
241
|
+
email: 'email@email'
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
const data = yield confirmSignIn(inputParam);
|
|
245
|
+
const { username } = yield getCurrentUser();
|
|
246
|
+
console.log(data);
|
|
269
247
|
this.consumingProjectAuthService.onPasswordUpdate(username);
|
|
270
248
|
this.router.navigate([LoginConstant.loginPageUrl]);
|
|
271
249
|
this.consumingProjectAuthService.newPasswordSetThenUpdateToBackend(username);
|
|
272
|
-
}
|
|
273
|
-
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
console.log(err);
|
|
274
253
|
this.setNewPasswordErrorMessage = LoginConstant.sessionExpired;
|
|
275
254
|
this.setNewPasswordButtonMessage = LoginConstant.loginAgain;
|
|
276
|
-
}
|
|
255
|
+
}
|
|
277
256
|
});
|
|
278
257
|
}
|
|
279
258
|
onForgotPasswordGenerateOTP(email) {
|
|
280
|
-
|
|
281
|
-
this
|
|
282
|
-
|
|
283
|
-
|
|
259
|
+
var _a, _b;
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
let username = email;
|
|
262
|
+
this.userName = email;
|
|
263
|
+
try {
|
|
264
|
+
let result = yield resetPassword({ username });
|
|
284
265
|
this.verifyAndSetNewPasswordMessage =
|
|
285
266
|
LoginConstant.verifyAndSetNewPasswordMessage +
|
|
286
|
-
result.
|
|
267
|
+
((_b = (_a = result === null || result === void 0 ? void 0 : result.nextStep) === null || _a === void 0 ? void 0 : _a.codeDeliveryDetails) === null || _b === void 0 ? void 0 : _b.destination) +
|
|
287
268
|
LoginConstant.pleaseEnterItBelow;
|
|
288
269
|
this.router.navigate([LoginConstant.verifyAndSetNewPasswordUrl]);
|
|
289
|
-
}
|
|
290
|
-
|
|
270
|
+
}
|
|
271
|
+
catch (err) {
|
|
272
|
+
}
|
|
291
273
|
});
|
|
292
274
|
}
|
|
293
|
-
verifyCode(
|
|
294
|
-
this
|
|
295
|
-
|
|
275
|
+
verifyCode(confirmationCode, newPassword) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
const { username } = yield getCurrentUser();
|
|
278
|
+
try {
|
|
279
|
+
confirmResetPassword({ username, newPassword, confirmationCode });
|
|
280
|
+
this.consumingProjectAuthService.onPasswordUpdate(username);
|
|
281
|
+
this.expiryAllExistingCurrentSession(username, newPassword);
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
console.log(err);
|
|
296
285
|
this.noOfAttempts = this.noOfAttempts + 1;
|
|
297
|
-
this.verifyAndSetNewPasswordErrorMessage = this.forgotPasswordError(
|
|
286
|
+
this.verifyAndSetNewPasswordErrorMessage = this.forgotPasswordError(err, this.noOfAttempts);
|
|
298
287
|
this.forgotPasswordAndGlobalSignoutLoader = false;
|
|
299
|
-
}
|
|
300
|
-
onSuccess: () => {
|
|
301
|
-
let username = this.cognitoUser.getUsername();
|
|
302
|
-
this.consumingProjectAuthService.onPasswordUpdate(username);
|
|
303
|
-
this.expiryAllExistingCurrentSession(newPassword);
|
|
304
|
-
},
|
|
288
|
+
}
|
|
305
289
|
});
|
|
306
290
|
}
|
|
307
291
|
forgotPasswordError(err, noOfAttempts) {
|
|
@@ -320,45 +304,51 @@ class AnnaLibAuthService {
|
|
|
320
304
|
}
|
|
321
305
|
return errorMessage;
|
|
322
306
|
}
|
|
323
|
-
|
|
324
|
-
this.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
307
|
+
signInWithOKTA() {
|
|
308
|
+
this.consumingProjectAuthService.signInWithOKTA();
|
|
309
|
+
}
|
|
310
|
+
handleSignOut() {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
try {
|
|
313
|
+
yield signOut({ global: false });
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
console.log('error signing out: ', error);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
332
319
|
}
|
|
333
|
-
expiryAllExistingCurrentSession(newPassword) {
|
|
334
|
-
|
|
335
|
-
this.
|
|
336
|
-
this.onLoginInCogntioToGetAccessToken();
|
|
320
|
+
expiryAllExistingCurrentSession(username, newPassword) {
|
|
321
|
+
this.setUserDetails();
|
|
322
|
+
this.onLoginInCogntioToGetAccessToken(username, newPassword);
|
|
337
323
|
}
|
|
338
|
-
setUserDetails(
|
|
324
|
+
setUserDetails() {
|
|
339
325
|
this.loginErrorMessage = null;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
this
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
326
|
+
}
|
|
327
|
+
onLoginInCogntioToGetAccessToken(username, password) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
try {
|
|
330
|
+
const { isSignedIn, nextStep } = yield signIn({ username, password });
|
|
331
|
+
let session = yield fetchAuthSession();
|
|
332
|
+
switch (nextStep === null || nextStep === void 0 ? void 0 : nextStep.signInStep) {
|
|
333
|
+
case "DONE":
|
|
334
|
+
this.getAllCognitoTokenAndGroups(session.tokens);
|
|
335
|
+
this.onCallGlobalSignout();
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
catch (error) { }
|
|
352
340
|
});
|
|
353
341
|
}
|
|
354
342
|
onCallGlobalSignout() {
|
|
355
|
-
this
|
|
356
|
-
|
|
357
|
-
|
|
343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
try {
|
|
345
|
+
yield signOut({ global: true });
|
|
358
346
|
this.forgotPasswordAndGlobalSignoutLoader = false;
|
|
359
347
|
this.router.navigate([LoginConstant.loginPageUrl]);
|
|
360
|
-
}
|
|
361
|
-
|
|
348
|
+
}
|
|
349
|
+
catch (error) {
|
|
350
|
+
console.log('error signing out: ', error);
|
|
351
|
+
}
|
|
362
352
|
});
|
|
363
353
|
}
|
|
364
354
|
}
|
|
@@ -484,14 +474,17 @@ class LoginComponent {
|
|
|
484
474
|
this.authService.consumingProjectAuthService.isLoggingIn = true;
|
|
485
475
|
const username = this.loginForm.controls['username'].value;
|
|
486
476
|
const password = this.loginForm.controls['password'].value;
|
|
487
|
-
this.authService.
|
|
477
|
+
this.authService.handleSignIn({ username, password });
|
|
478
|
+
}
|
|
479
|
+
signInWithOKTA() {
|
|
480
|
+
this.authService.signInWithOKTA();
|
|
488
481
|
}
|
|
489
482
|
}
|
|
490
483
|
LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LoginComponent, deps: [{ token: AnnaLibAuthService }, { token: i2.FormBuilder }, { token: CONFIG_SERVICE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
491
|
-
LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: LoginComponent, selector: "anna-cognito-lib-login", ngImport: i0, template: "<div class=\"main\">\r\n <!-- Load login page when all constant variable are intiated otherwise it will show a glitch. that's why ngIf check of constants.forgotPassword -->\r\n <section *ngIf=\"constants.forgotPassword\">\r\n <header>\r\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\" alt=\"Anna Logo\" priority/>\r\n </header>\r\n <article>\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"OnLogin()\">\r\n <div id=\"alert-div\" *ngIf=\"authService.loginErrorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p>{{ authService.loginErrorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"username\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.enterEmail\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"2\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.password\"\r\n autocomplete=\"current-password\"\r\n autofocus\r\n />\r\n\r\n <a tabindex=\"4\" [routerLink]=\"constants.forgortPasswordPageUrl\">{{ constants.forgotPassword }}</a>\r\n <button\r\n tabindex=\"3\"\r\n class=\"login-btn\"\r\n [anna-cognito-lib-SpinnerButton]=\"authService.consumingProjectAuthService.isLoggingIn\"\r\n [spinnerButtonText]=\"constants.login\"\r\n ></button>\r\n </form>\r\n </article>\r\n <footer>\r\n <anna-cognito-lib-powered-by-logo-template>\r\n </anna-cognito-lib-powered-by-logo-template>\r\n </footer>\r\n </section>\r\n</div>\r\n\r\n<div class=\"page-footer\">\r\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\r\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\r\n</div>\r\n", 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 #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}#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;margin-top:.9375rem}.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}a{float:right;color:#268bff;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline}a:hover{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "directive", type: SpinnerButtonDirective, selector: "[anna-cognito-lib-SpinnerButton]", inputs: ["anna-cognito-lib-SpinnerButton", "spinnerButtonText"] }, { 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" }] });
|
|
484
|
+
LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: LoginComponent, selector: "anna-cognito-lib-login", ngImport: i0, template: "<div class=\"main\">\r\n <!-- Load login page when all constant variable are intiated otherwise it will show a glitch. that's why ngIf check of constants.forgotPassword -->\r\n <section *ngIf=\"constants.forgotPassword\">\r\n <header>\r\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\" alt=\"Anna Logo\" priority/>\r\n </header>\r\n <article>\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"OnLogin()\">\r\n <div id=\"alert-div\" *ngIf=\"authService.loginErrorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p>{{ authService.loginErrorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"username\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.enterEmail\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"2\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.password\"\r\n autocomplete=\"current-password\"\r\n autofocus\r\n />\r\n\r\n <a tabindex=\"4\" [routerLink]=\"constants.forgortPasswordPageUrl\">{{ constants.forgotPassword }}</a>\r\n <button\r\n tabindex=\"3\"\r\n class=\"login-btn\"\r\n [anna-cognito-lib-SpinnerButton]=\"authService.consumingProjectAuthService.isLoggingIn\"\r\n [spinnerButtonText]=\"constants.login\"\r\n ></button>\r\n </form>\r\n <button class=\"login-btn\" (click)=\"signInWithOKTA()\">Sign in with DUO</button>\r\n </article>\r\n <footer>\r\n <anna-cognito-lib-powered-by-logo-template>\r\n </anna-cognito-lib-powered-by-logo-template>\r\n </footer>\r\n </section>\r\n</div>\r\n\r\n<div class=\"page-footer\">\r\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\r\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\r\n</div>\r\n", 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 #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}#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;margin-top:.9375rem}.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}a{float:right;color:#268bff;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline}a:hover{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "directive", type: SpinnerButtonDirective, selector: "[anna-cognito-lib-SpinnerButton]", inputs: ["anna-cognito-lib-SpinnerButton", "spinnerButtonText"] }, { 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" }] });
|
|
492
485
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: LoginComponent, decorators: [{
|
|
493
486
|
type: Component,
|
|
494
|
-
args: [{ selector: "anna-cognito-lib-login", template: "<div class=\"main\">\r\n <!-- Load login page when all constant variable are intiated otherwise it will show a glitch. that's why ngIf check of constants.forgotPassword -->\r\n <section *ngIf=\"constants.forgotPassword\">\r\n <header>\r\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\" alt=\"Anna Logo\" priority/>\r\n </header>\r\n <article>\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"OnLogin()\">\r\n <div id=\"alert-div\" *ngIf=\"authService.loginErrorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p>{{ authService.loginErrorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"username\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.enterEmail\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"2\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.password\"\r\n autocomplete=\"current-password\"\r\n autofocus\r\n />\r\n\r\n <a tabindex=\"4\" [routerLink]=\"constants.forgortPasswordPageUrl\">{{ constants.forgotPassword }}</a>\r\n <button\r\n tabindex=\"3\"\r\n class=\"login-btn\"\r\n [anna-cognito-lib-SpinnerButton]=\"authService.consumingProjectAuthService.isLoggingIn\"\r\n [spinnerButtonText]=\"constants.login\"\r\n ></button>\r\n </form>\r\n </article>\r\n <footer>\r\n <anna-cognito-lib-powered-by-logo-template>\r\n </anna-cognito-lib-powered-by-logo-template>\r\n </footer>\r\n </section>\r\n</div>\r\n\r\n<div class=\"page-footer\">\r\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\r\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\r\n</div>\r\n", 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 #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}#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;margin-top:.9375rem}.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}a{float:right;color:#268bff;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline}a:hover{cursor:pointer}\n"] }]
|
|
487
|
+
args: [{ selector: "anna-cognito-lib-login", template: "<div class=\"main\">\r\n <!-- Load login page when all constant variable are intiated otherwise it will show a glitch. that's why ngIf check of constants.forgotPassword -->\r\n <section *ngIf=\"constants.forgotPassword\">\r\n <header>\r\n <img [ngSrc]=\"consumingProjectConfigService.appGenericConfig.loginPageLogoImgUrl\" width=\"145\" height=\"50\" alt=\"Anna Logo\" priority/>\r\n </header>\r\n <article>\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"OnLogin()\">\r\n <div id=\"alert-div\" *ngIf=\"authService.loginErrorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p>{{ authService.loginErrorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"username\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.enterEmail\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"2\"\r\n formControlName=\"password\"\r\n [ngClass]=\"{ 'input-invalid': authService.loginErrorMessage }\"\r\n [placeholder]=\"constants.password\"\r\n autocomplete=\"current-password\"\r\n autofocus\r\n />\r\n\r\n <a tabindex=\"4\" [routerLink]=\"constants.forgortPasswordPageUrl\">{{ constants.forgotPassword }}</a>\r\n <button\r\n tabindex=\"3\"\r\n class=\"login-btn\"\r\n [anna-cognito-lib-SpinnerButton]=\"authService.consumingProjectAuthService.isLoggingIn\"\r\n [spinnerButtonText]=\"constants.login\"\r\n ></button>\r\n </form>\r\n <button class=\"login-btn\" (click)=\"signInWithOKTA()\">Sign in with DUO</button>\r\n </article>\r\n <footer>\r\n <anna-cognito-lib-powered-by-logo-template>\r\n </anna-cognito-lib-powered-by-logo-template>\r\n </footer>\r\n </section>\r\n</div>\r\n\r\n<div class=\"page-footer\">\r\n <anna-cognito-lib-surewaves-year-logo></anna-cognito-lib-surewaves-year-logo>\r\n <anna-cognito-lib-version-and-term-policy></anna-cognito-lib-version-and-term-policy>\r\n</div>\r\n", 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 #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}#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;margin-top:.9375rem}.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}a{float:right;color:#268bff;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline}a:hover{cursor:pointer}\n"] }]
|
|
495
488
|
}], ctorParameters: function () {
|
|
496
489
|
return [{ type: AnnaLibAuthService }, { type: i2.FormBuilder }, { type: undefined, decorators: [{
|
|
497
490
|
type: Inject,
|
|
@@ -614,7 +607,7 @@ class SetNewPasswordComponent {
|
|
|
614
607
|
this.router.navigate([LoginConstant.loginPageUrl]);
|
|
615
608
|
}
|
|
616
609
|
else {
|
|
617
|
-
this.authService.
|
|
610
|
+
this.authService.changePassword(this.password.value);
|
|
618
611
|
}
|
|
619
612
|
}
|
|
620
613
|
}
|
|
@@ -631,6 +624,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
631
624
|
}] }];
|
|
632
625
|
} });
|
|
633
626
|
|
|
627
|
+
class AuthenticationData {
|
|
628
|
+
constructor(Username, Password) {
|
|
629
|
+
this.Username = Username;
|
|
630
|
+
this.Password = Password;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
class UserPoolInformation {
|
|
634
|
+
constructor(UserPoolId, ClientId) {
|
|
635
|
+
this.UserPoolId = UserPoolId;
|
|
636
|
+
this.ClientId = ClientId;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
class UsernameInfo {
|
|
640
|
+
constructor(object) {
|
|
641
|
+
this.isUsernameAvailable = object.isUsernameAvailable;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
class UserState {
|
|
645
|
+
constructor(userState) {
|
|
646
|
+
this.userStatus = userState;
|
|
647
|
+
this.isUserWithTempPassword = userState == 'FORCE_CHANGE_PASSWORD';
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
634
651
|
// Angular import statements
|
|
635
652
|
class ForgotPasswordComponent {
|
|
636
653
|
constructor(authService, fb, toastr, router, consumingProjectConfigService) {
|