@annalib/anna-cognito-lib 0.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/README.md +39 -0
- package/annalib-anna-cognito-lib.d.ts +5 -0
- package/esm2020/annalib-anna-cognito-lib.mjs +5 -0
- package/esm2020/lib/anna-cognito-lib.module.mjs +74 -0
- package/esm2020/lib/components/forgot-password/forgot-password.component.mjs +69 -0
- package/esm2020/lib/components/login/login.component.mjs +44 -0
- package/esm2020/lib/components/password-matching/password-matching.component.mjs +90 -0
- package/esm2020/lib/components/set-new-password/set-new-password.component.mjs +55 -0
- package/esm2020/lib/components/verify-and-set-new-password/verify-and-set-new-password.component.mjs +66 -0
- package/esm2020/lib/config/acl-service.token.mjs +4 -0
- package/esm2020/lib/config/auth-service.token.mjs +4 -0
- package/esm2020/lib/config/library.config.mjs +6 -0
- package/esm2020/lib/constants/loginConstant.mjs +46 -0
- package/esm2020/lib/directives/spinner-button/index.mjs +2 -0
- package/esm2020/lib/directives/spinner-button/spinner-button.directive.mjs +42 -0
- package/esm2020/lib/models/auth.model.mjs +18 -0
- package/esm2020/lib/services/acl.service.mjs +30 -0
- package/esm2020/lib/services/auth.service.mjs +228 -0
- package/esm2020/public-api.mjs +21 -0
- package/fesm2015/annalib-anna-cognito-lib.mjs +716 -0
- package/fesm2015/annalib-anna-cognito-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-cognito-lib.mjs +709 -0
- package/fesm2020/annalib-anna-cognito-lib.mjs.map +1 -0
- package/lib/anna-cognito-lib.module.d.ts +18 -0
- package/lib/components/forgot-password/forgot-password.component.d.ts +31 -0
- package/lib/components/login/login.component.d.ts +19 -0
- package/lib/components/password-matching/password-matching.component.d.ts +22 -0
- package/lib/components/set-new-password/set-new-password.component.d.ts +26 -0
- package/lib/components/verify-and-set-new-password/verify-and-set-new-password.component.d.ts +30 -0
- package/lib/config/acl-service.token.d.ts +19 -0
- package/lib/config/auth-service.token.d.ts +11 -0
- package/lib/config/library.config.d.ts +7 -0
- package/lib/constants/loginConstant.d.ts +40 -0
- package/lib/directives/spinner-button/index.d.ts +1 -0
- package/lib/directives/spinner-button/spinner-button.directive.d.ts +15 -0
- package/lib/models/auth.model.d.ts +16 -0
- package/lib/services/acl.service.d.ts +12 -0
- package/lib/services/auth.service.d.ts +57 -0
- package/package.json +37 -0
- package/public-api.d.ts +13 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annalib-anna-cognito-lib.mjs","sources":["../../../projects/anna-cognito-lib/src/lib/constants/loginConstant.ts","../../../projects/anna-cognito-lib/src/lib/models/auth.model.ts","../../../projects/anna-cognito-lib/src/lib/config/acl-service.token.ts","../../../projects/anna-cognito-lib/src/lib/services/acl.service.ts","../../../projects/anna-cognito-lib/src/lib/config/library.config.ts","../../../projects/anna-cognito-lib/src/lib/config/auth-service.token.ts","../../../projects/anna-cognito-lib/src/lib/services/auth.service.ts","../../../projects/anna-cognito-lib/src/lib/directives/spinner-button/spinner-button.directive.ts","../../../projects/anna-cognito-lib/src/lib/components/login/login.component.ts","../../../projects/anna-cognito-lib/src/lib/components/login/login.component.html","../../../projects/anna-cognito-lib/src/lib/components/password-matching/password-matching.component.ts","../../../projects/anna-cognito-lib/src/lib/components/password-matching/password-matching.component.html","../../../projects/anna-cognito-lib/src/lib/components/set-new-password/set-new-password.component.ts","../../../projects/anna-cognito-lib/src/lib/components/set-new-password/set-new-password.component.html","../../../projects/anna-cognito-lib/src/lib/components/forgot-password/forgot-password.component.ts","../../../projects/anna-cognito-lib/src/lib/components/forgot-password/forgot-password.component.html","../../../projects/anna-cognito-lib/src/lib/components/verify-and-set-new-password/verify-and-set-new-password.component.ts","../../../projects/anna-cognito-lib/src/lib/components/verify-and-set-new-password/verify-and-set-new-password.component.html","../../../projects/anna-cognito-lib/src/lib/anna-cognito-lib.module.ts","../../../projects/anna-cognito-lib/src/public-api.ts","../../../projects/anna-cognito-lib/src/annalib-anna-cognito-lib.ts"],"sourcesContent":["export class LoginConstant {\r\n // Login page\r\n static readonly enterEmail = \"Enter your username\";\r\n static readonly password = \"Password\";\r\n static readonly confirmPassword = \"Confirm Password\";\r\n static readonly login = \"Login\";\r\n static readonly otp = \"OTP\";\r\n static readonly forgotPassword = \"Forgot \" + LoginConstant.password.toLowerCase() + \"?\";\r\n\r\n // set new password\r\n static readonly setNewPasswordHeading = \"Set new \" + LoginConstant.password.toLowerCase();\r\n static readonly setNewPasswordButton = \"Set and \" + LoginConstant.login.toLowerCase() + \" again\";\r\n static readonly passwordMustContain = \"The password must contain:\";\r\n static readonly minimumCharacter = \"Minimum 8 characters\";\r\n static readonly oneUppercase = \"1 Uppercase\";\r\n static readonly oneLowercase = \"1 Lowercase\";\r\n static readonly oneNumber = \"1 Numerical\";\r\n static readonly specialCharacter = \"1 Special character\";\r\n static readonly passwordNotMatching = \"The passwords do not match. Please try again.\";\r\n static readonly userNamePasswordIncorrect = \"Incorrect username or password\";\r\n static readonly userNotFound = \"No registered user found\";\r\n static readonly loginAgain = LoginConstant.login + \" again\";\r\n\r\n // verify OTP & set new password\r\n static readonly verifyAndSetNewPasswordheading = \"Enter \" + LoginConstant.otp + \" & set new password\";\r\n static readonly verifyAndSetNewPasswordMessage = \"An \" + LoginConstant.otp + \" has been succesfully emailed to \";\r\n static readonly pleaseEnterItBelow = \". Please enter it below.\";\r\n static readonly regenerateOtp = \"Regenerate \" + LoginConstant.otp;\r\n static readonly enterOtp = \"Enter \" + LoginConstant.otp;\r\n static readonly submit = \"Submit\";\r\n static readonly attempt = \"Attempt\";\r\n static readonly attemptLimitExceeded =\r\n \"You have exceeded the maximum number of allowed attempts. Please try again after 15 minutes.\";\r\n static readonly attemptMessage = \" of 5. The OTP entered is incorrect. Please try again with the right one.\";\r\n static readonly sessionExpired = \"The session has expired. Please try again.\";\r\n\r\n // forgot password\r\n static readonly forgotPasswordHeading = \"Forgot your password?\";\r\n static readonly forgotPasswordMessage = \"Please enter your username.\";\r\n static readonly forgotPasswordButton = \"Get \" + LoginConstant.otp;\r\n static readonly apiFailErrorMessage = \"Unable to connect to server right now. Please try after some time.\";\r\n\r\n //url\r\n static readonly setNewPasswordUrl = \"/set-new-password\";\r\n static readonly forgortPasswordPageUrl = \"/forgot-password\";\r\n static readonly verifyAndSetNewPasswordUrl = \"/verify-and-set-new-password\";\r\n static readonly loginPageUrl = \"/login\";\r\n static readonly homePageUrl = \"/home\";\r\n static readonly stationSettingUrl = \"/station-settings\";\r\n}\r\n","export class AuthenticationData {\r\n Username: string;\r\n Password: string;\r\n constructor(Username: string, Password: string) {\r\n this.Username = Username;\r\n this.Password = Password;\r\n }\r\n}\r\n\r\nexport class UserPoolInformation {\r\n UserPoolId: string;\r\n ClientId: string;\r\n constructor(UserPoolId: string, ClientId: string) {\r\n this.UserPoolId = UserPoolId;\r\n this.ClientId = ClientId;\r\n }\r\n}\r\n\r\nexport class UsernameInfo {\r\n isUsernameAvailable: boolean;\r\n constructor(object: { isUsernameAvailable: boolean }) {\r\n this.isUsernameAvailable = object.isUsernameAvailable;\r\n }\r\n}","import { InjectionToken } from '@angular/core';\r\n\r\n/** Token to inject the acl service */\r\nexport const ACL_SERVICE_TOKEN:\r\n InjectionToken<IAclService> =\r\n new InjectionToken<IAclService>('ACL service token');\r\n\r\nexport interface IAclService {\r\n urlToCognitoPrivilegeMap: {[key: string]: string};\r\n DAILY_REVISION_REPORT_WRITE: string;\r\n LUR_SETTINGS_WRITE: string;\r\n MANAGE_BUSINESS_RULES_WRITE: string;\r\n MANAGE_USERS_WRITE: string;\r\n ORDER_BIZ_RULES_WRITE: string;\r\n ORDER_REVISIONS_WRITE: string;\r\n ORDER_SPOTS_REPORT_WRITE: string;\r\n RATE_CARD_WRITE: string;\r\n STATION_SYSTEM_SETTINGS_WRITE: string;\r\n POLITICAL_WINDOW_WRITE: string;\r\n \r\n isUserAuthoriseToAcessManageUser(): boolean;\r\n}","import { Inject, Injectable } from \"@angular/core\";\r\nimport { IAclService, ACL_SERVICE_TOKEN } from '../config/acl-service.token';\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AnnaLibAclService {\r\n constructor(@Inject(ACL_SERVICE_TOKEN) public consumingProjectAclService: IAclService) {}\r\n\r\n userGroupsInCognitoJWT: string[];\r\n isUserAuthorisedToAccessPage(url: string): boolean {\r\n let privilegeName = this.consumingProjectAclService.urlToCognitoPrivilegeMap[url];\r\n return this.userGroupsInCognitoJWT.includes(privilegeName);\r\n }\r\n\r\n isUserAuthorisedToAccessElement(privilege: string): boolean {\r\n return this.userGroupsInCognitoJWT.includes(privilege);\r\n }\r\n\r\n isUserAuthoriseToAcessManageUser(): boolean {\r\n return this.consumingProjectAclService.isUserAuthoriseToAcessManageUser();\r\n }\r\n\r\n}\r\n","export class LibraryConfig { \r\n loginPageLogoImgUrl: string = '';\r\n cognito : {\r\n userPoolId: string;\r\n clientId: string; \r\n }\r\n \r\n}","import { InjectionToken } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\n/** Token to inject the auth service */\r\nexport const AUTH_SERVICE_TOKEN:\r\n InjectionToken<IAuthService> =\r\n new InjectionToken<IAuthService>('Auth service token');\r\n\r\nexport interface IAuthService {\r\n isLoggingIn: boolean; \r\n onSuccessfulAuthenticatingUser(result: any): void;\r\n isUsernameAvailable(username: string): Observable<any>;\r\n navigateBasedOnUserRole(loginUserData: any): void;\r\n getPublicIp(): string;\r\n}","import { LoginConstant } from \"../constants/loginConstant\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { CognitoUserPool, CognitoUser, AuthenticationDetails, CognitoUserSession } from \"amazon-cognito-identity-js\";\r\nimport { AuthenticationData, UserPoolInformation } from \"../models/auth.model\";\r\nimport { AnnaLibAclService } from './acl.service';\r\nimport { LibraryConfig } from '../config/library.config';\r\nimport { IAuthService, AUTH_SERVICE_TOKEN } from '../config/auth-service.token';\r\n\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AnnaLibAuthService {\r\n poolData: UserPoolInformation;\r\n userPool: CognitoUserPool;\r\n cognitoUser: CognitoUser;\r\n authenticationDetails: AuthenticationDetails;\r\n tokenValid: boolean;\r\n accessToken: string;\r\n userAttribute: any;\r\n loginErrorMessage: string | null;\r\n setNewPasswordErrorMessage: string;\r\n setNewPasswordButtonMessage: string;\r\n verifyAndSetNewPasswordErrorMessage: string;\r\n verifyAndSetNewPasswordMessage: string;\r\n verifyAndSetNewPasswordButton: string;\r\n noOfAttempts = 0;\r\n sessionLocked = false;\r\n userName: any;\r\n accessTokenTimerId: any;\r\n IdToken: any;\r\n\r\n constructor(\r\n private router: Router,\r\n public aclService: AnnaLibAclService,\r\n public libraryConfig: LibraryConfig,\r\n @Inject(AUTH_SERVICE_TOKEN) public consumingProjectAuthService: IAuthService) {\r\n if(!consumingProjectAuthService) {\r\n throw new Error('You must provide a authService');\r\n }\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n getPublicIp(): any {\r\n this.consumingProjectAuthService.getPublicIp();\r\n }\r\n isUsernameAvailable(username: string): any {\r\n this.consumingProjectAuthService.isUsernameAvailable(username);\r\n }\r\n navigateBasedOnUserRole(loginUserData: any){\r\n this.consumingProjectAuthService.navigateBasedOnUserRole(loginUserData);\r\n };\r\n onSuccessfulAuthenticatingUser(result: any) { \r\n this.consumingProjectAuthService.onSuccessfulAuthenticatingUser(result);\r\n }\r\n\r\n /***\r\n 1. takes user pool data (userPool ID and client ID)\r\n 2. if current user is null then it means user already logged out then simply return Promise<false>\r\n 3. if current user present check if token is valid for it.\r\n */\r\n isUserLoggedIn(): Promise<boolean> {\r\n let currentUser = this.getCurrentUserDetails();\r\n if (currentUser) {\r\n return new Promise((resolve, reject) => {\r\n currentUser && currentUser.getSession((error: Error, token: CognitoUserSession | null) => {\r\n if (token) {\r\n this.getAllCognitoTokenAndGroups(token);\r\n resolve(true);\r\n } else {\r\n this.sessionTimeout();\r\n resolve(false);\r\n }\r\n });\r\n });\r\n } else {\r\n return new Promise((resolve) => {\r\n clearInterval(this.accessTokenTimerId);\r\n resolve(false);\r\n });\r\n }\r\n }\r\n\r\n sessionTimeout() {\r\n localStorage.clear();\r\n clearInterval(this.accessTokenTimerId);\r\n this.router.navigate([LoginConstant.loginPageUrl]);\r\n }\r\n\r\n refreshAccessToken() {\r\n let currentUser = this.getCurrentUserDetails();\r\n let accessTokenExpiration = localStorage.getItem(\"accessTokenExpiration\");\r\n let expTime = accessTokenExpiration ? parseInt(accessTokenExpiration) : 0;\r\n this.accessTokenTimerId = setInterval(() => {\r\n let counter = 1000;\r\n let delayFunction = setTimeout(() => {\r\n currentUser && currentUser.getSession((error: any, token: CognitoUserSession | null) => {\r\n if (token) {\r\n this.getAllCognitoTokenAndGroups(token);\r\n let newExpTime = this.computeTokenExpiration(this.IdToken);\r\n\r\n if (newExpTime <= 0) {\r\n newExpTime = 1000;\r\n counter = 0;\r\n if (delayFunction) {\r\n clearInterval(delayFunction);\r\n }\r\n }\r\n expTime = newExpTime;\r\n localStorage.setItem(\"accessTokenExpiration\", newExpTime.toString());\r\n clearInterval(this.accessTokenTimerId);\r\n this.refreshAccessToken();\r\n } else if (error.code === \"NotAuthorizedException\") {\r\n this.sessionTimeout();\r\n }\r\n });\r\n }, counter);\r\n }, expTime);\r\n }\r\n\r\n computeTokenExpiration(token: any) {\r\n let currentTime = Math.floor(Date.now() / 1000);\r\n let tokenTime = token.payload.exp;\r\n let expTime = (tokenTime - currentTime) * 1000;\r\n return expTime;\r\n }\r\n\r\n\r\n getCurrentUserDetails() {\r\n let poolData = new UserPoolInformation(this.libraryConfig.cognito.userPoolId, this.libraryConfig.cognito.clientId);\r\n let userPool = new CognitoUserPool(poolData);\r\n return userPool.getCurrentUser();\r\n }\r\n\r\n getCognitoUserDetails(email: string): CognitoUser {\r\n this.poolData = new UserPoolInformation(this.libraryConfig.cognito.userPoolId, this.libraryConfig.cognito.clientId);\r\n this.userPool = new CognitoUserPool(this.poolData);\r\n\r\n let userData = {\r\n Username: email,\r\n Pool: this.userPool,\r\n };\r\n let cognitoUser = new CognitoUser(userData);\r\n return cognitoUser;\r\n }\r\n\r\n authenticate(email: string, password: string) {\r\n this.loginErrorMessage = null;\r\n let authData = new AuthenticationData(email, password);\r\n this.authenticationDetails = new AuthenticationDetails(authData);\r\n\r\n this.cognitoUser = this.getCognitoUserDetails(email);\r\n this.CognitoAuthentication(this.authenticationDetails);\r\n }\r\n\r\n CognitoAuthentication(authenticationDetails: AuthenticationDetails) {\r\n this.cognitoUser.authenticateUser(authenticationDetails, {\r\n onSuccess: async (result) => {\r\n this.getAllCognitoTokenAndGroups(result);\r\n await this.onSuccessfulAuthenticatingUser(result);\r\n },\r\n onFailure: (err) => {\r\n this.consumingProjectAuthService.isLoggingIn = false;\r\n if (err.message === \"Password attempts exceeded\") {\r\n this.loginErrorMessage = LoginConstant.attemptLimitExceeded;\r\n } else {\r\n this.loginErrorMessage = LoginConstant.userNamePasswordIncorrect;\r\n }\r\n },\r\n newPasswordRequired: (data) => {\r\n this.consumingProjectAuthService.isLoggingIn = false;\r\n this.userAttribute = data;\r\n this.router.navigate([LoginConstant.setNewPasswordUrl]);\r\n },\r\n });\r\n }\r\n\r\n setNewPassword(newPassword: any) {\r\n delete this.userAttribute.email_verified;\r\n delete this.userAttribute.phone_number_verified;\r\n this.cognitoUser.completeNewPasswordChallenge(newPassword, this.userAttribute, {\r\n onSuccess: (result) => {\r\n this.router.navigate([LoginConstant.loginPageUrl]);\r\n },\r\n onFailure: (error) => {\r\n this.setNewPasswordErrorMessage = LoginConstant.sessionExpired;\r\n this.setNewPasswordButtonMessage = LoginConstant.loginAgain;\r\n },\r\n });\r\n }\r\n\r\n onForgotPasswordGenerateOTP(email: string) {\r\n this.userName = email;\r\n this.cognitoUser = this.getCognitoUserDetails(email);\r\n this.cognitoUser.forgotPassword({\r\n onSuccess: (result) => {\r\n this.verifyAndSetNewPasswordMessage =\r\n LoginConstant.verifyAndSetNewPasswordMessage +\r\n result.CodeDeliveryDetails.Destination +\r\n LoginConstant.pleaseEnterItBelow;\r\n this.router.navigate([LoginConstant.verifyAndSetNewPasswordUrl]);\r\n },\r\n onFailure: (err) => {},\r\n });\r\n }\r\n\r\n verifyCode(verificationCode: string, newPassword: string) {\r\n this.cognitoUser.confirmPassword(verificationCode, newPassword, {\r\n onFailure: (error) => {\r\n this.noOfAttempts = this.noOfAttempts + 1;\r\n this.verifyAndSetNewPasswordErrorMessage = this.forgotPasswordError(error, this.noOfAttempts);\r\n },\r\n onSuccess: () => {\r\n this.router.navigate([LoginConstant.loginPageUrl]);\r\n },\r\n });\r\n }\r\n\r\n forgotPasswordError(err: any, noOfAttempts: number) {\r\n let errorMessage;\r\n switch (err.code) {\r\n case \"LimitExceededException\":\r\n this.sessionLocked = true;\r\n errorMessage = LoginConstant.attemptLimitExceeded;\r\n break;\r\n case \"ExpiredCodeException\":\r\n errorMessage = LoginConstant.sessionExpired;\r\n this.verifyAndSetNewPasswordButton = LoginConstant.regenerateOtp;\r\n break;\r\n default:\r\n errorMessage = LoginConstant.attempt + \" \" + noOfAttempts + LoginConstant.attemptMessage;\r\n }\r\n return errorMessage;\r\n }\r\n\r\n getAllCognitoTokenAndGroups(token: CognitoUserSession) {\r\n this.accessToken = token.getAccessToken().getJwtToken();\r\n this.IdToken = token.getIdToken();\r\n if (\"cognito:groups\" in token.getAccessToken().payload) {\r\n this.aclService.userGroupsInCognitoJWT = token.getAccessToken().payload[\"cognito:groups\"];\r\n } else {\r\n this.aclService.userGroupsInCognitoJWT = [];\r\n }\r\n }\r\n\r\n\r\n\r\n}\r\n\r\n","import { Directive, ElementRef, Input, Renderer2, SimpleChanges, OnChanges, OnInit } from \"@angular/core\";\r\n\r\n@Directive({\r\n selector: \"[appSpinnerButton]\",\r\n})\r\nexport class SpinnerButtonDirective implements OnInit, OnChanges {\r\n @Input(\"appSpinnerButton\") loading: boolean;\r\n @Input(\"spinnerButtonText\") spinnerButtonText: string;\r\n child: HTMLDivElement;\r\n button: any;\r\n\r\n constructor(\r\n private el: ElementRef, \r\n private renderer: Renderer2) {\r\n this.button = this.el.nativeElement;\r\n this.child = document.createElement(\"div\");\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['spinnerButtonText'] && changes['spinnerButtonText'].currentValue) {\r\n this.button.innerHTML = this.spinnerButtonText;\r\n }\r\n if (changes['loading'] && changes['loading'].currentValue) {\r\n this.button.innerHTML = \"\";\r\n this.button.setAttribute(\"disabled\", \"true\");\r\n this.child.classList.add(\"spinner-for-button-directive\");\r\n this.renderer.appendChild(this.button, this.child);\r\n } else {\r\n this.child.classList.remove(\"spinner-for-button-directive\");\r\n this.button.removeAttribute(\"disabled\");\r\n this.button.innerHTML = this.spinnerButtonText;\r\n }\r\n }\r\n}\r\n","// Angular import statements\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\r\n\r\n// User defined import statements\r\nimport { LoginConstant } from \"../../constants/loginConstant\";\r\nimport { AnnaLibAuthService } from '../../services/auth.service';\r\nimport { LibraryConfig } from '../../config/library.config';\r\n\r\n@Component({\r\n selector: \"lib-login\",\r\n templateUrl: \"./login.component.html\",\r\n styleUrls: [\"./login.component.scss\"],\r\n})\r\nexport class LoginComponent implements OnInit {\r\n loginForm: FormGroup;\r\n constants: typeof LoginConstant;\r\n\r\n constructor(\r\n public authService: AnnaLibAuthService,\r\n private fb: FormBuilder,\r\n public libraryConfig: LibraryConfig\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.constants = LoginConstant;\r\n this.onIntialiseForm();\r\n }\r\n\r\n onIntialiseForm() {\r\n this.loginForm = this.fb.group({\r\n username: [null],\r\n password: [null],\r\n });\r\n }\r\n\r\n OnLogin() {\r\n this.authService.consumingProjectAuthService.isLoggingIn = true;\r\n const username = this.loginForm.controls['username'].value;\r\n const password = this.loginForm.controls['password'].value;\r\n this.authService.authenticate(username, password);\r\n }\r\n\r\n \r\n}\r\n","<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 [src]=\"libraryConfig.loginPageLogoImgUrl\" loading=\"eager\" alt=\"Anna Logo\" />\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 [appSpinnerButton]=\"authService.consumingProjectAuthService.isLoggingIn\"\r\n [spinnerButtonText]=\"constants.login\"\r\n ></button>\r\n </form>\r\n </article>\r\n <footer>Powered by <span>SureWaves</span></footer>\r\n </section>\r\n</div>\r\n","// Angular import statements\r\nimport { EventEmitter, Inject, Input, Output } from \"@angular/core\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { AbstractControl, FormBuilder, FormGroup, ValidationErrors, ValidatorFn, Validators } from \"@angular/forms\";\r\n\r\n// Third party import statements\r\nimport { debounceTime } from \"rxjs/operators\";\r\n\r\n// User defined import statements\r\nimport { LoginConstant } from \"../../constants/loginConstant\";\r\n\r\n@Component({\r\n selector: 'lib-password-matching',\r\n templateUrl: './password-matching.component.html',\r\n styleUrls: ['./password-matching.component.scss']\r\n})\r\nexport class PasswordMatchingComponent implements OnInit {\r\n @Output() passwordChange = new EventEmitter();\r\n @Output() confirmPasswordChange = new EventEmitter();\r\n\r\n @Input() passwordNotMatching: boolean;\r\n passwordForm: FormGroup;\r\n constants: typeof LoginConstant;\r\n constructor(@Inject(FormBuilder) private fb: FormBuilder) {}\r\n\r\n ngOnInit() {\r\n this.constants = LoginConstant;\r\n this.createGroup();\r\n this.formValueChanged();\r\n }\r\n\r\n formValueChanged() {\r\n const password = this.passwordForm.get(\"password\");\r\n const confirmPassword = this.passwordForm.get(\"confirmPassword\");\r\n\r\n password && password.valueChanges.subscribe(() => {\r\n password && password.setValidators([\r\n Validators.required,\r\n this.regexValidator(new RegExp(\".{8,}\"), { minLength: true }),\r\n this.regexValidator(new RegExp(\"[a-z]\"), { lowercase: true }),\r\n this.regexValidator(new RegExp(\"[A-Z]\"), { uppercase: true }),\r\n this.regexValidator(new RegExp(\"[0-9]\"), { number: true }),\r\n this.regexValidator(new RegExp(\"[^a-zA-Z0-9]\"), { specialCharacter: true }),\r\n ]);\r\n password.updateValueAndValidity({ emitEvent: false });\r\n this.onPasswordChange();\r\n });\r\n\r\n if(confirmPassword){\r\n confirmPassword.valueChanges.pipe(debounceTime(300)).subscribe(() => {\r\n confirmPassword.setValidators([Validators.required]);\r\n confirmPassword.updateValueAndValidity({ emitEvent: false });\r\n this.onConfirmPasswordChange();\r\n });\r\n }\r\n \r\n }\r\n\r\n onPasswordChange() {\r\n let result = {\r\n value: this.passwordForm.value.password,\r\n status: this.passwordForm.controls['password'].status,\r\n };\r\n this.passwordChange.emit(result);\r\n }\r\n\r\n onConfirmPasswordChange() {\r\n let result = {\r\n value: this.passwordForm.value.confirmPassword,\r\n status: this.passwordForm.controls['confirmPassword'].status,\r\n };\r\n this.confirmPasswordChange.emit(result);\r\n }\r\n\r\n createGroup() {\r\n this.passwordForm = this.fb.group({\r\n password: [null],\r\n confirmPassword: [null],\r\n });\r\n return this.passwordForm;\r\n }\r\n\r\n // TODO: check the return again\r\n regexValidator(regex: RegExp, error: ValidationErrors): any\r\n {\r\n return (control: AbstractControl): { [key: string]: boolean } => {\r\n const valid = regex.test(control.value);\r\n return (valid ? null : error) as any;\r\n };\r\n }\r\n\r\n}\r\n","<form [formGroup]=\"passwordForm\">\r\n <div id=\"alert-div\" *ngIf=\"passwordNotMatching\">\r\n <div id=\"icon-div\">\r\n <span class=\"material-icons\">report</span>\r\n </div>\r\n <p>{{ constants.passwordNotMatching }}</p>\r\n </div>\r\n <div class=\"password-policies\">\r\n <ng-container *ngIf=\"!passwordForm.get('password')?.dirty\">\r\n <p>\r\n <b>{{ constants.passwordMustContain }} </b>\r\n </p>\r\n <p>{{ constants.minimumCharacter }}</p>\r\n <p>{{ constants.oneUppercase }}</p>\r\n <p>{{ constants.oneLowercase }}</p>\r\n <p>{{ constants.oneNumber }}</p>\r\n <p>{{ constants.specialCharacter }}</p>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"passwordForm.get('password')?.dirty\">\r\n <p>\r\n <b>{{ constants.passwordMustContain }}</b>\r\n </p>\r\n\r\n <div [ngClass]=\"passwordForm.get('password')?.hasError('minLength') ? 'error-color' : 'success-color'\">\r\n <div id=\"icon-div-msg\">\r\n <span class=\"material-icons\" *ngIf=\"passwordForm.get('password')?.hasError('minLength')\"> cancel </span>\r\n <span class=\"material-icons\" *ngIf=\"!passwordForm.get('password')?.hasError('minLength')\"> check_circle </span>\r\n </div>\r\n <span class=\"span-text\">{{ constants.minimumCharacter }}</span>\r\n </div>\r\n\r\n <div [ngClass]=\"passwordForm.get('password')?.hasError('uppercase') ? 'error-color' : 'success-color'\">\r\n <div id=\"icon-div-msg\">\r\n <span class=\"material-icons\" *ngIf=\"passwordForm.get('password')?.hasError('uppercase')\"> cancel </span>\r\n <span class=\"material-icons\" *ngIf=\"!passwordForm.get('password')?.hasError('uppercase')\"> check_circle </span>\r\n </div>\r\n <span class=\"span-text\">{{ constants.oneUppercase }}</span>\r\n </div>\r\n\r\n <div [ngClass]=\"passwordForm.get('password')?.hasError('lowercase') ? 'error-color' : 'success-color'\">\r\n <div id=\"icon-div-msg\">\r\n <span class=\"material-icons\" *ngIf=\"passwordForm.get('password')?.hasError('lowercase')\"> cancel </span>\r\n <span class=\"material-icons\" *ngIf=\"!passwordForm.get('password')?.hasError('lowercase')\"> check_circle </span>\r\n </div>\r\n <span class=\"span-text\">{{ constants.oneLowercase }}</span>\r\n </div>\r\n\r\n <div [ngClass]=\"passwordForm.get('password')?.hasError('number') ? 'error-color' : 'success-color'\">\r\n <div id=\"icon-div-msg\">\r\n <span class=\"material-icons\" *ngIf=\"passwordForm.get('password')?.hasError('number')\"> cancel </span>\r\n <span class=\"material-icons\" *ngIf=\"!passwordForm.get('password')?.hasError('number')\"> check_circle </span>\r\n </div>\r\n <span class=\"span-text\">{{ constants.oneNumber }}</span>\r\n </div>\r\n\r\n <div [ngClass]=\"passwordForm.get('password')?.hasError('specialCharacter') ? 'error-color' : 'success-color'\">\r\n <div id=\"icon-div-msg\">\r\n <span class=\"material-icons\" *ngIf=\"passwordForm.get('password')?.hasError('specialCharacter')\"> cancel </span>\r\n <span class=\"material-icons\" *ngIf=\"!passwordForm.get('password')?.hasError('specialCharacter')\">\r\n check_circle\r\n </span>\r\n </div>\r\n <span class=\"span-text\">{{ constants.specialCharacter }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"2\"\r\n formControlName=\"password\"\r\n [placeholder]=\"constants.password\"\r\n [ngClass]=\"{ 'input-invalid': passwordNotMatching }\"\r\n />\r\n\r\n <input\r\n type=\"password\"\r\n tabindex=\"3\"\r\n formControlName=\"confirmPassword\"\r\n [placeholder]=\"constants.confirmPassword\"\r\n [ngClass]=\"{ 'input-invalid': passwordNotMatching }\"\r\n />\r\n</form>\r\n","\r\n// Angular import statements\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n// User defined import statements\r\nimport { AnnaLibAuthService } from \"../../services/auth.service\";\r\nimport { LoginConstant } from \"../../constants/loginConstant\";\r\ntype passwordType = { value: string | null, status: string | null };\r\n\r\n@Component({\r\n selector: 'lib-set-new-password',\r\n templateUrl: './set-new-password.component.html',\r\n styleUrls: ['./set-new-password.component.scss']\r\n})\r\nexport class SetNewPasswordComponent implements OnInit {\r\n passwordNotMatching = false;\r\n \r\n password: passwordType = { value: null, status: null };\r\n confirmPassword: passwordType = { value: null, status: null };\r\n constants: typeof LoginConstant;\r\n\r\n constructor(public authService: AnnaLibAuthService, \r\n private router: Router) {}\r\n\r\n ngOnInit() {\r\n this.constants = LoginConstant;\r\n this.authService.setNewPasswordButtonMessage = LoginConstant.setNewPasswordButton;\r\n }\r\n\r\n isFormValid() {\r\n return this.password.status === \"VALID\" && this.confirmPassword.status === \"VALID\";\r\n }\r\n onPasswordChange($event: passwordType) {\r\n this.password = $event;\r\n }\r\n\r\n onConfirmPasswordChange($event: passwordType) {\r\n this.confirmPassword = $event;\r\n }\r\n\r\n onSettingNewPassword() {\r\n if (this.password.value != this.confirmPassword.value) {\r\n this.passwordNotMatching = true;\r\n } else {\r\n this.passwordNotMatching = false;\r\n if (this.authService.setNewPasswordButtonMessage === LoginConstant.loginAgain) {\r\n this.router.navigate([LoginConstant.loginPageUrl]);\r\n } else {\r\n this.authService.setNewPassword(this.password.value);\r\n }\r\n }\r\n }\r\n}\r\n","<div class=\"main\">\r\n <section>\r\n <header>\r\n <img src=\"assets/images/Anna-Logo-for-footer-min.png\" alt=\"Anna Logo\" />\r\n </header>\r\n <article>\r\n <form>\r\n <div id=\"heading\">\r\n {{ constants.setNewPasswordHeading }}\r\n </div>\r\n\r\n <div id=\"alert-div\" *ngIf=\"authService.setNewPasswordErrorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p>{{ authService.setNewPasswordErrorMessage }}</p>\r\n </div>\r\n <lib-password-matching\r\n (passwordChange)=\"onPasswordChange($event)\"\r\n (confirmPasswordChange)=\"onConfirmPasswordChange($event)\"\r\n [passwordNotMatching]=\"passwordNotMatching\"\r\n >\r\n </lib-password-matching>\r\n <button tabindex=\"3\" class=\"login-btn\" [disabled]=\"!isFormValid()\" (click)=\"onSettingNewPassword()\">\r\n {{ authService.setNewPasswordButtonMessage }}\r\n </button>\r\n </form>\r\n </article>\r\n <footer>\r\n Powered by <span> <strong> SureWaves</strong></span>\r\n </footer>\r\n </section>\r\n</div>\r\n","// Angular import statements\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\r\n\r\n// Third party import statements\r\nimport { ToastrService } from \"ngx-toastr\";\r\n\r\n// User defined import statements\r\nimport { UsernameInfo } from \"../../models/auth.model\";\r\nimport { AnnaLibAuthService } from \"../../services/auth.service\";\r\nimport { LoginConstant } from \"../../constants/loginConstant\";\r\n\r\n@Component({\r\n selector: 'lib-forgot-password',\r\n templateUrl: './forgot-password.component.html',\r\n styleUrls: ['./forgot-password.component.scss']\r\n})\r\nexport class ForgotPasswordComponent implements OnInit {\r\n errorMessage: string;\r\n verifyRegisteredEmail: FormGroup;\r\n passwordNotMatching = false;\r\n constants: typeof LoginConstant;\r\n password = { value: null, status: null };\r\n confirmPassword = { value: null, status: null };\r\n\r\n constructor(\r\n private authService: AnnaLibAuthService,\r\n private fb: FormBuilder,\r\n private toastr: ToastrService\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.constants = LoginConstant;\r\n this.onIntialiseForm();\r\n if (this.authService.userName) {\r\n this.onUpdateForm();\r\n }\r\n }\r\n\r\n onIntialiseForm() {\r\n this.verifyRegisteredEmail = this.fb.group({\r\n email: [null, [Validators.required]],\r\n });\r\n }\r\n\r\n onUpdateForm() {\r\n this.verifyRegisteredEmail.patchValue({\r\n email: this.authService.userName,\r\n });\r\n }\r\n\r\n isFormValid() {\r\n return this.verifyRegisteredEmail.valid;\r\n }\r\n\r\n onVerifyRegisteredEmail() {\r\n let username = this.verifyRegisteredEmail.controls['email'].value;\r\n this.authService.consumingProjectAuthService.isUsernameAvailable(username)\r\n .subscribe(\r\n {\r\n next: (response) => {\r\n let res = new UsernameInfo(response);\r\n if (!res.isUsernameAvailable) {\r\n this.authService.onForgotPasswordGenerateOTP(username);\r\n } else {\r\n this.errorMessage = this.constants.userNotFound;\r\n }\r\n },\r\n error: any => {\r\n this.toastr.error(LoginConstant.apiFailErrorMessage);\r\n }\r\n }\r\n );\r\n }\r\n}\r\n","<div class=\"main\">\r\n <section>\r\n <header>\r\n <img src=\"assets/images/Anna-Logo-for-footer-min.png\" alt=\"Anna Logo\" />\r\n </header>\r\n <article>\r\n <form [formGroup]=\"verifyRegisteredEmail\">\r\n <div id=\"heading\">\r\n {{ constants.forgotPasswordHeading }}\r\n </div>\r\n <p>\r\n {{ constants.forgotPasswordMessage }}\r\n </p>\r\n <div id=\"alert-div\" *ngIf=\"errorMessage\">\r\n <span class=\"material-icons\">report</span>\r\n <p id=\"alert-msg\">{{ errorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"email\"\r\n [placeholder]=\"constants.enterEmail\"\r\n [ngClass]=\"{\r\n 'input-invalid': verifyRegisteredEmail.get('email')?.dirty && verifyRegisteredEmail.get('email')?.errors\r\n }\"\r\n />\r\n\r\n <button\r\n tabindex=\"2\"\r\n type=\"submit\"\r\n class=\"login-btn\"\r\n [disabled]=\"!isFormValid()\"\r\n (click)=\"onVerifyRegisteredEmail()\"\r\n >\r\n {{ constants.forgotPasswordButton }}\r\n </button>\r\n </form>\r\n </article>\r\n <footer>\r\n Powered by <span> <strong> SureWaves</strong></span>\r\n </footer>\r\n </section>\r\n</div>\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\r\nimport { Router } from \"@angular/router\";\r\nimport { AnnaLibAuthService } from \"../../services/auth.service\";\r\nimport { LoginConstant } from \"../../constants/loginConstant\";\r\ntype passwordType = { value: string | null, status: string | null };\r\n\r\n@Component({\r\n selector: 'lib-verify-and-set-new-password',\r\n templateUrl: './verify-and-set-new-password.component.html',\r\n styleUrls: ['./verify-and-set-new-password.component.scss']\r\n})\r\nexport class VerifyAndSetNewPasswordComponent implements OnInit {\r\n verifyOtpForm: FormGroup;\r\n passwordNotMatching = false;\r\n constants: typeof LoginConstant;\r\n password: passwordType = { value: null, status: null };\r\n confirmPassword: passwordType = { value: null, status: null };\r\n\r\n constructor(\r\n public authService: AnnaLibAuthService,\r\n private fb: FormBuilder,\r\n private router: Router\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.constants = LoginConstant;\r\n this.authService.verifyAndSetNewPasswordButton = LoginConstant.setNewPasswordButton;\r\n this.onIntialiseForm();\r\n }\r\n\r\n onIntialiseForm() {\r\n this.verifyOtpForm = this.fb.group({\r\n otp: [null, [Validators.required]],\r\n });\r\n }\r\n\r\n isFormValid() {\r\n if (\r\n this.password.status === \"VALID\" &&\r\n this.confirmPassword.status === \"VALID\" &&\r\n this.verifyOtpForm.controls['otp'].valid\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n onPasswordChange($event: passwordType) {\r\n this.password = $event;\r\n }\r\n\r\n onConfirmPasswordChange($event: passwordType) {\r\n this.confirmPassword = $event;\r\n }\r\n\r\n onVerifyOtpSettingNewPassword() {\r\n if (this.password.value != this.confirmPassword.value) {\r\n this.passwordNotMatching = true;\r\n } else {\r\n this.passwordNotMatching = false;\r\n if (this.authService.verifyAndSetNewPasswordButton === LoginConstant.regenerateOtp) {\r\n this.router.navigate([LoginConstant.forgortPasswordPageUrl]);\r\n } else {\r\n this.password.value && this.authService.verifyCode(this.verifyOtpForm.controls['otp'].value, this.password.value);\r\n }\r\n }\r\n }\r\n\r\n}\r\n","<div class=\"main\" [ngClass]=\"{ 'main-height': authService.verifyAndSetNewPasswordErrorMessage }\">\r\n <section>\r\n <header>\r\n <img src=\"assets/images/Anna-Logo-for-footer-min.png\" alt=\"Anna Logo\" />\r\n </header>\r\n <article>\r\n <span class=\"back-btn\" [routerLink]=\"constants.forgortPasswordPageUrl\">\r\n <i class=\"mdi mdi-arrow-left\"></i>\r\n </span>\r\n\r\n <form [formGroup]=\"verifyOtpForm\">\r\n <div class=\"pull-left\" id=\"heading\">\r\n {{ constants.verifyAndSetNewPasswordheading }}\r\n </div>\r\n <p>{{ authService.verifyAndSetNewPasswordMessage }}</p>\r\n\r\n <div id=\"alert-div\" *ngIf=\"authService.verifyAndSetNewPasswordErrorMessage\">\r\n <div id=\"icon-div\">\r\n <span class=\"material-icons\">report</span>\r\n </div>\r\n <p id=\"display-block-msg\">{{ authService.verifyAndSetNewPasswordErrorMessage }}</p>\r\n </div>\r\n\r\n <input\r\n type=\"text\"\r\n tabindex=\"1\"\r\n formControlName=\"otp\"\r\n [placeholder]=\"constants.enterOtp\"\r\n autocomplete=\"new-field-name\"\r\n [ngClass]=\"{ 'input-invalid': authService.verifyAndSetNewPasswordErrorMessage }\"\r\n />\r\n\r\n <lib-password-matching\r\n (passwordChange)=\"onPasswordChange($event)\"\r\n (confirmPasswordChange)=\"onConfirmPasswordChange($event)\"\r\n [passwordNotMatching]=\"passwordNotMatching\"\r\n >\r\n </lib-password-matching>\r\n <button\r\n tabindex=\"4\"\r\n type=\"submit\"\r\n class=\"login-btn\"\r\n [disabled]=\"authService.sessionLocked || !isFormValid()\"\r\n (click)=\"onVerifyOtpSettingNewPassword()\"\r\n >\r\n {{ authService.verifyAndSetNewPasswordButton }}\r\n </button>\r\n </form>\r\n </article>\r\n <footer>\r\n Powered by <span> <strong>SureWaves</strong> </span>\r\n </footer>\r\n </section>\r\n</div>\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { SpinnerButtonDirective } from './directives/spinner-button';\r\nimport { LibraryConfig } from './config/library.config';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SetNewPasswordComponent } from './components/set-new-password/set-new-password.component';\r\nimport { PasswordMatchingComponent } from './components/password-matching/password-matching.component';\r\nimport { ForgotPasswordComponent } from './components/forgot-password/forgot-password.component';\r\nimport { VerifyAndSetNewPasswordComponent } from './components/verify-and-set-new-password/verify-and-set-new-password.component';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n LoginComponent,\r\n SetNewPasswordComponent,\r\n PasswordMatchingComponent,\r\n ForgotPasswordComponent,\r\n VerifyAndSetNewPasswordComponent,\r\n SpinnerButtonDirective,\r\n ],\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n CommonModule\r\n ],\r\n exports: [\r\n LoginComponent,\r\n SetNewPasswordComponent,\r\n PasswordMatchingComponent,\r\n ForgotPasswordComponent,\r\n VerifyAndSetNewPasswordComponent,\r\n SpinnerButtonDirective\r\n ]\r\n})\r\nexport class AnnaCognitoLibModule {\r\n public static forRoot(configuration: LibraryConfig): ModuleWithProviders<AnnaCognitoLibModule> {\r\n return {\r\n ngModule: AnnaCognitoLibModule,\r\n providers: [\r\n {\r\n provide: LibraryConfig, \r\n useValue: configuration\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of anna-cognito-lib\r\n */\r\n\r\nexport * from './lib/anna-cognito-lib.module';\r\n\r\n//COMPONENTS \r\nexport * from './lib/components/login/login.component';\r\nexport * from './lib/components/forgot-password/forgot-password.component';\r\nexport * from './lib/components/set-new-password/set-new-password.component';\r\nexport * from './lib/components/password-matching/password-matching.component';\r\nexport * from './lib/components/verify-and-set-new-password/verify-and-set-new-password.component';\r\n\r\n//SERVICES \r\nexport * from './lib/services/auth.service';\r\nexport * from './lib/services/acl.service';\r\nexport * from './lib/config/auth-service.token';\r\nexport * from './lib/config/acl-service.token';\r\nexport * from './lib/config/library.config';\r\n\r\n//DIRECTIVES \r\nexport * from './lib/directives/spinner-button';\r\n\r\n//CONSTANTS \r\nexport * from './lib/constants/loginConstant';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AnnaLibAuthService","i3.LibraryConfig","i5","i6.SpinnerButtonDirective","i1","i2","i3.PasswordMatchingComponent","i4","i3","i4.PasswordMatchingComponent"],"mappings":";;;;;;;;;;;;MAAa,aAAa,CAAA;;AACxB;AACgB,aAAU,CAAA,UAAA,GAAG,qBAAqB,CAAC;AACnC,aAAQ,CAAA,QAAA,GAAG,UAAU,CAAC;AACtB,aAAe,CAAA,eAAA,GAAG,kBAAkB,CAAC;AACrC,aAAK,CAAA,KAAA,GAAG,OAAO,CAAC;AAChB,aAAG,CAAA,GAAA,GAAG,KAAK,CAAC;AACZ,aAAc,CAAA,cAAA,GAAG,SAAS,GAAG,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC;AAExF;AACgB,aAAqB,CAAA,qBAAA,GAAG,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC1E,aAAoB,CAAA,oBAAA,GAAG,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC;AACjF,aAAmB,CAAA,mBAAA,GAAG,4BAA4B,CAAC;AACnD,aAAgB,CAAA,gBAAA,GAAG,sBAAsB,CAAC;AAC1C,aAAY,CAAA,YAAA,GAAG,aAAa,CAAC;AAC7B,aAAY,CAAA,YAAA,GAAG,aAAa,CAAC;AAC7B,aAAS,CAAA,SAAA,GAAG,aAAa,CAAC;AAC1B,aAAgB,CAAA,gBAAA,GAAG,qBAAqB,CAAC;AACzC,aAAmB,CAAA,mBAAA,GAAG,+CAA+C,CAAC;AACtE,aAAyB,CAAA,yBAAA,GAAG,gCAAgC,CAAC;AAC7D,aAAY,CAAA,YAAA,GAAG,0BAA0B,CAAC;AAC1C,aAAA,CAAA,UAAU,GAAG,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AAgC;wBAChC,sBAAsB;AACvB,qBAAA;AACF,iBAAA,CAAA;;;ACrCD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { LibraryConfig } from './config/library.config';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./components/login/login.component";
|
|
5
|
+
import * as i2 from "./components/set-new-password/set-new-password.component";
|
|
6
|
+
import * as i3 from "./components/password-matching/password-matching.component";
|
|
7
|
+
import * as i4 from "./components/forgot-password/forgot-password.component";
|
|
8
|
+
import * as i5 from "./components/verify-and-set-new-password/verify-and-set-new-password.component";
|
|
9
|
+
import * as i6 from "./directives/spinner-button/spinner-button.directive";
|
|
10
|
+
import * as i7 from "@angular/forms";
|
|
11
|
+
import * as i8 from "@angular/router";
|
|
12
|
+
import * as i9 from "@angular/common";
|
|
13
|
+
export declare class AnnaCognitoLibModule {
|
|
14
|
+
static forRoot(configuration: LibraryConfig): ModuleWithProviders<AnnaCognitoLibModule>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnnaCognitoLibModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AnnaCognitoLibModule, [typeof i1.LoginComponent, typeof i2.SetNewPasswordComponent, typeof i3.PasswordMatchingComponent, typeof i4.ForgotPasswordComponent, typeof i5.VerifyAndSetNewPasswordComponent, typeof i6.SpinnerButtonDirective], [typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.RouterModule, typeof i9.CommonModule], [typeof i1.LoginComponent, typeof i2.SetNewPasswordComponent, typeof i3.PasswordMatchingComponent, typeof i4.ForgotPasswordComponent, typeof i5.VerifyAndSetNewPasswordComponent, typeof i6.SpinnerButtonDirective]>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AnnaCognitoLibModule>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
+
import { ToastrService } from "ngx-toastr";
|
|
4
|
+
import { AnnaLibAuthService } from "../../services/auth.service";
|
|
5
|
+
import { LoginConstant } from "../../constants/loginConstant";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ForgotPasswordComponent implements OnInit {
|
|
8
|
+
private authService;
|
|
9
|
+
private fb;
|
|
10
|
+
private toastr;
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
verifyRegisteredEmail: FormGroup;
|
|
13
|
+
passwordNotMatching: boolean;
|
|
14
|
+
constants: typeof LoginConstant;
|
|
15
|
+
password: {
|
|
16
|
+
value: null;
|
|
17
|
+
status: null;
|
|
18
|
+
};
|
|
19
|
+
confirmPassword: {
|
|
20
|
+
value: null;
|
|
21
|
+
status: null;
|
|
22
|
+
};
|
|
23
|
+
constructor(authService: AnnaLibAuthService, fb: FormBuilder, toastr: ToastrService);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
onIntialiseForm(): void;
|
|
26
|
+
onUpdateForm(): void;
|
|
27
|
+
isFormValid(): boolean;
|
|
28
|
+
onVerifyRegisteredEmail(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "lib-forgot-password", never, {}, {}, never, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
+
import { LoginConstant } from "../../constants/loginConstant";
|
|
4
|
+
import { AnnaLibAuthService } from '../../services/auth.service';
|
|
5
|
+
import { LibraryConfig } from '../../config/library.config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class LoginComponent implements OnInit {
|
|
8
|
+
authService: AnnaLibAuthService;
|
|
9
|
+
private fb;
|
|
10
|
+
libraryConfig: LibraryConfig;
|
|
11
|
+
loginForm: FormGroup;
|
|
12
|
+
constants: typeof LoginConstant;
|
|
13
|
+
constructor(authService: AnnaLibAuthService, fb: FormBuilder, libraryConfig: LibraryConfig);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
onIntialiseForm(): void;
|
|
16
|
+
OnLogin(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "lib-login", never, {}, {}, never, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { OnInit } from "@angular/core";
|
|
3
|
+
import { FormBuilder, FormGroup, ValidationErrors } from "@angular/forms";
|
|
4
|
+
import { LoginConstant } from "../../constants/loginConstant";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class PasswordMatchingComponent implements OnInit {
|
|
7
|
+
private fb;
|
|
8
|
+
passwordChange: EventEmitter<any>;
|
|
9
|
+
confirmPasswordChange: EventEmitter<any>;
|
|
10
|
+
passwordNotMatching: boolean;
|
|
11
|
+
passwordForm: FormGroup;
|
|
12
|
+
constants: typeof LoginConstant;
|
|
13
|
+
constructor(fb: FormBuilder);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
formValueChanged(): void;
|
|
16
|
+
onPasswordChange(): void;
|
|
17
|
+
onConfirmPasswordChange(): void;
|
|
18
|
+
createGroup(): FormGroup;
|
|
19
|
+
regexValidator(regex: RegExp, error: ValidationErrors): any;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordMatchingComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordMatchingComponent, "lib-password-matching", never, { "passwordNotMatching": "passwordNotMatching"; }, { "passwordChange": "passwordChange"; "confirmPasswordChange": "confirmPasswordChange"; }, never, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { Router } from "@angular/router";
|
|
3
|
+
import { AnnaLibAuthService } from "../../services/auth.service";
|
|
4
|
+
import { LoginConstant } from "../../constants/loginConstant";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
declare type passwordType = {
|
|
7
|
+
value: string | null;
|
|
8
|
+
status: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare class SetNewPasswordComponent implements OnInit {
|
|
11
|
+
authService: AnnaLibAuthService;
|
|
12
|
+
private router;
|
|
13
|
+
passwordNotMatching: boolean;
|
|
14
|
+
password: passwordType;
|
|
15
|
+
confirmPassword: passwordType;
|
|
16
|
+
constants: typeof LoginConstant;
|
|
17
|
+
constructor(authService: AnnaLibAuthService, router: Router);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
isFormValid(): boolean;
|
|
20
|
+
onPasswordChange($event: passwordType): void;
|
|
21
|
+
onConfirmPasswordChange($event: passwordType): void;
|
|
22
|
+
onSettingNewPassword(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SetNewPasswordComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SetNewPasswordComponent, "lib-set-new-password", never, {}, {}, never, never>;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
+
import { Router } from "@angular/router";
|
|
4
|
+
import { AnnaLibAuthService } from "../../services/auth.service";
|
|
5
|
+
import { LoginConstant } from "../../constants/loginConstant";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
declare type passwordType = {
|
|
8
|
+
value: string | null;
|
|
9
|
+
status: string | null;
|
|
10
|
+
};
|
|
11
|
+
export declare class VerifyAndSetNewPasswordComponent implements OnInit {
|
|
12
|
+
authService: AnnaLibAuthService;
|
|
13
|
+
private fb;
|
|
14
|
+
private router;
|
|
15
|
+
verifyOtpForm: FormGroup;
|
|
16
|
+
passwordNotMatching: boolean;
|
|
17
|
+
constants: typeof LoginConstant;
|
|
18
|
+
password: passwordType;
|
|
19
|
+
confirmPassword: passwordType;
|
|
20
|
+
constructor(authService: AnnaLibAuthService, fb: FormBuilder, router: Router);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
onIntialiseForm(): void;
|
|
23
|
+
isFormValid(): boolean;
|
|
24
|
+
onPasswordChange($event: passwordType): void;
|
|
25
|
+
onConfirmPasswordChange($event: passwordType): void;
|
|
26
|
+
onVerifyOtpSettingNewPassword(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VerifyAndSetNewPasswordComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VerifyAndSetNewPasswordComponent, "lib-verify-and-set-new-password", never, {}, {}, never, never>;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/** Token to inject the acl service */
|
|
3
|
+
export declare const ACL_SERVICE_TOKEN: InjectionToken<IAclService>;
|
|
4
|
+
export interface IAclService {
|
|
5
|
+
urlToCognitoPrivilegeMap: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
DAILY_REVISION_REPORT_WRITE: string;
|
|
9
|
+
LUR_SETTINGS_WRITE: string;
|
|
10
|
+
MANAGE_BUSINESS_RULES_WRITE: string;
|
|
11
|
+
MANAGE_USERS_WRITE: string;
|
|
12
|
+
ORDER_BIZ_RULES_WRITE: string;
|
|
13
|
+
ORDER_REVISIONS_WRITE: string;
|
|
14
|
+
ORDER_SPOTS_REPORT_WRITE: string;
|
|
15
|
+
RATE_CARD_WRITE: string;
|
|
16
|
+
STATION_SYSTEM_SETTINGS_WRITE: string;
|
|
17
|
+
POLITICAL_WINDOW_WRITE: string;
|
|
18
|
+
isUserAuthoriseToAcessManageUser(): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/** Token to inject the auth service */
|
|
4
|
+
export declare const AUTH_SERVICE_TOKEN: InjectionToken<IAuthService>;
|
|
5
|
+
export interface IAuthService {
|
|
6
|
+
isLoggingIn: boolean;
|
|
7
|
+
onSuccessfulAuthenticatingUser(result: any): void;
|
|
8
|
+
isUsernameAvailable(username: string): Observable<any>;
|
|
9
|
+
navigateBasedOnUserRole(loginUserData: any): void;
|
|
10
|
+
getPublicIp(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare class LoginConstant {
|
|
2
|
+
static readonly enterEmail = "Enter your username";
|
|
3
|
+
static readonly password = "Password";
|
|
4
|
+
static readonly confirmPassword = "Confirm Password";
|
|
5
|
+
static readonly login = "Login";
|
|
6
|
+
static readonly otp = "OTP";
|
|
7
|
+
static readonly forgotPassword: string;
|
|
8
|
+
static readonly setNewPasswordHeading: string;
|
|
9
|
+
static readonly setNewPasswordButton: string;
|
|
10
|
+
static readonly passwordMustContain = "The password must contain:";
|
|
11
|
+
static readonly minimumCharacter = "Minimum 8 characters";
|
|
12
|
+
static readonly oneUppercase = "1 Uppercase";
|
|
13
|
+
static readonly oneLowercase = "1 Lowercase";
|
|
14
|
+
static readonly oneNumber = "1 Numerical";
|
|
15
|
+
static readonly specialCharacter = "1 Special character";
|
|
16
|
+
static readonly passwordNotMatching = "The passwords do not match. Please try again.";
|
|
17
|
+
static readonly userNamePasswordIncorrect = "Incorrect username or password";
|
|
18
|
+
static readonly userNotFound = "No registered user found";
|
|
19
|
+
static readonly loginAgain: string;
|
|
20
|
+
static readonly verifyAndSetNewPasswordheading: string;
|
|
21
|
+
static readonly verifyAndSetNewPasswordMessage: string;
|
|
22
|
+
static readonly pleaseEnterItBelow = ". Please enter it below.";
|
|
23
|
+
static readonly regenerateOtp: string;
|
|
24
|
+
static readonly enterOtp: string;
|
|
25
|
+
static readonly submit = "Submit";
|
|
26
|
+
static readonly attempt = "Attempt";
|
|
27
|
+
static readonly attemptLimitExceeded = "You have exceeded the maximum number of allowed attempts. Please try again after 15 minutes.";
|
|
28
|
+
static readonly attemptMessage = " of 5. The OTP entered is incorrect. Please try again with the right one.";
|
|
29
|
+
static readonly sessionExpired = "The session has expired. Please try again.";
|
|
30
|
+
static readonly forgotPasswordHeading = "Forgot your password?";
|
|
31
|
+
static readonly forgotPasswordMessage = "Please enter your username.";
|
|
32
|
+
static readonly forgotPasswordButton: string;
|
|
33
|
+
static readonly apiFailErrorMessage = "Unable to connect to server right now. Please try after some time.";
|
|
34
|
+
static readonly setNewPasswordUrl = "/set-new-password";
|
|
35
|
+
static readonly forgortPasswordPageUrl = "/forgot-password";
|
|
36
|
+
static readonly verifyAndSetNewPasswordUrl = "/verify-and-set-new-password";
|
|
37
|
+
static readonly loginPageUrl = "/login";
|
|
38
|
+
static readonly homePageUrl = "/home";
|
|
39
|
+
static readonly stationSettingUrl = "/station-settings";
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./spinner-button.directive";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementRef, Renderer2, SimpleChanges, OnChanges, OnInit } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SpinnerButtonDirective implements OnInit, OnChanges {
|
|
4
|
+
private el;
|
|
5
|
+
private renderer;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
spinnerButtonText: string;
|
|
8
|
+
child: HTMLDivElement;
|
|
9
|
+
button: any;
|
|
10
|
+
constructor(el: ElementRef, renderer: Renderer2);
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpinnerButtonDirective, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SpinnerButtonDirective, "[appSpinnerButton]", never, { "loading": "appSpinnerButton"; "spinnerButtonText": "spinnerButtonText"; }, {}, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class AuthenticationData {
|
|
2
|
+
Username: string;
|
|
3
|
+
Password: string;
|
|
4
|
+
constructor(Username: string, Password: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class UserPoolInformation {
|
|
7
|
+
UserPoolId: string;
|
|
8
|
+
ClientId: string;
|
|
9
|
+
constructor(UserPoolId: string, ClientId: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class UsernameInfo {
|
|
12
|
+
isUsernameAvailable: boolean;
|
|
13
|
+
constructor(object: {
|
|
14
|
+
isUsernameAvailable: boolean;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IAclService } from '../config/acl-service.token';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AnnaLibAclService {
|
|
4
|
+
consumingProjectAclService: IAclService;
|
|
5
|
+
constructor(consumingProjectAclService: IAclService);
|
|
6
|
+
userGroupsInCognitoJWT: string[];
|
|
7
|
+
isUserAuthorisedToAccessPage(url: string): boolean;
|
|
8
|
+
isUserAuthorisedToAccessElement(privilege: string): boolean;
|
|
9
|
+
isUserAuthoriseToAcessManageUser(): boolean;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAclService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnnaLibAclService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Router } from "@angular/router";
|
|
2
|
+
import { CognitoUserPool, CognitoUser, AuthenticationDetails, CognitoUserSession } from "amazon-cognito-identity-js";
|
|
3
|
+
import { UserPoolInformation } from "../models/auth.model";
|
|
4
|
+
import { AnnaLibAclService } from './acl.service';
|
|
5
|
+
import { LibraryConfig } from '../config/library.config';
|
|
6
|
+
import { IAuthService } from '../config/auth-service.token';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AnnaLibAuthService {
|
|
9
|
+
private router;
|
|
10
|
+
aclService: AnnaLibAclService;
|
|
11
|
+
libraryConfig: LibraryConfig;
|
|
12
|
+
consumingProjectAuthService: IAuthService;
|
|
13
|
+
poolData: UserPoolInformation;
|
|
14
|
+
userPool: CognitoUserPool;
|
|
15
|
+
cognitoUser: CognitoUser;
|
|
16
|
+
authenticationDetails: AuthenticationDetails;
|
|
17
|
+
tokenValid: boolean;
|
|
18
|
+
accessToken: string;
|
|
19
|
+
userAttribute: any;
|
|
20
|
+
loginErrorMessage: string | null;
|
|
21
|
+
setNewPasswordErrorMessage: string;
|
|
22
|
+
setNewPasswordButtonMessage: string;
|
|
23
|
+
verifyAndSetNewPasswordErrorMessage: string;
|
|
24
|
+
verifyAndSetNewPasswordMessage: string;
|
|
25
|
+
verifyAndSetNewPasswordButton: string;
|
|
26
|
+
noOfAttempts: number;
|
|
27
|
+
sessionLocked: boolean;
|
|
28
|
+
userName: any;
|
|
29
|
+
accessTokenTimerId: any;
|
|
30
|
+
IdToken: any;
|
|
31
|
+
constructor(router: Router, aclService: AnnaLibAclService, libraryConfig: LibraryConfig, consumingProjectAuthService: IAuthService);
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
getPublicIp(): any;
|
|
34
|
+
isUsernameAvailable(username: string): any;
|
|
35
|
+
navigateBasedOnUserRole(loginUserData: any): void;
|
|
36
|
+
onSuccessfulAuthenticatingUser(result: any): void;
|
|
37
|
+
/***
|
|
38
|
+
1. takes user pool data (userPool ID and client ID)
|
|
39
|
+
2. if current user is null then it means user already logged out then simply return Promise<false>
|
|
40
|
+
3. if current user present check if token is valid for it.
|
|
41
|
+
*/
|
|
42
|
+
isUserLoggedIn(): Promise<boolean>;
|
|
43
|
+
sessionTimeout(): void;
|
|
44
|
+
refreshAccessToken(): void;
|
|
45
|
+
computeTokenExpiration(token: any): number;
|
|
46
|
+
getCurrentUserDetails(): CognitoUser | null;
|
|
47
|
+
getCognitoUserDetails(email: string): CognitoUser;
|
|
48
|
+
authenticate(email: string, password: string): void;
|
|
49
|
+
CognitoAuthentication(authenticationDetails: AuthenticationDetails): void;
|
|
50
|
+
setNewPassword(newPassword: any): void;
|
|
51
|
+
onForgotPasswordGenerateOTP(email: string): void;
|
|
52
|
+
verifyCode(verificationCode: string, newPassword: string): void;
|
|
53
|
+
forgotPasswordError(err: any, noOfAttempts: number): string;
|
|
54
|
+
getAllCognitoTokenAndGroups(token: CognitoUserSession): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnnaLibAuthService, never>;
|
|
56
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnnaLibAuthService>;
|
|
57
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@annalib/anna-cognito-lib",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^13.2.0",
|
|
6
|
+
"@angular/core": "^13.2.0",
|
|
7
|
+
"@mdi/font": "^5.1.45",
|
|
8
|
+
"@ng-bootstrap/ng-bootstrap": "^9.0.1",
|
|
9
|
+
"@types/node": "^12.11.1",
|
|
10
|
+
"amazon-cognito-identity-js": "^4.5.3",
|
|
11
|
+
"bootstrap": "^4.3.1",
|
|
12
|
+
"ngx-toastr": "^13.2.1"
|
|
13
|
+
},
|
|
14
|
+
"module": "fesm2015/annalib-anna-cognito-lib.mjs",
|
|
15
|
+
"es2020": "fesm2020/annalib-anna-cognito-lib.mjs",
|
|
16
|
+
"esm2020": "esm2020/annalib-anna-cognito-lib.mjs",
|
|
17
|
+
"fesm2020": "fesm2020/annalib-anna-cognito-lib.mjs",
|
|
18
|
+
"fesm2015": "fesm2015/annalib-anna-cognito-lib.mjs",
|
|
19
|
+
"typings": "annalib-anna-cognito-lib.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./annalib-anna-cognito-lib.d.ts",
|
|
26
|
+
"esm2020": "./esm2020/annalib-anna-cognito-lib.mjs",
|
|
27
|
+
"es2020": "./fesm2020/annalib-anna-cognito-lib.mjs",
|
|
28
|
+
"es2015": "./fesm2015/annalib-anna-cognito-lib.mjs",
|
|
29
|
+
"node": "./fesm2015/annalib-anna-cognito-lib.mjs",
|
|
30
|
+
"default": "./fesm2020/annalib-anna-cognito-lib.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"tslib": "^2.3.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './lib/anna-cognito-lib.module';
|
|
2
|
+
export * from './lib/components/login/login.component';
|
|
3
|
+
export * from './lib/components/forgot-password/forgot-password.component';
|
|
4
|
+
export * from './lib/components/set-new-password/set-new-password.component';
|
|
5
|
+
export * from './lib/components/password-matching/password-matching.component';
|
|
6
|
+
export * from './lib/components/verify-and-set-new-password/verify-and-set-new-password.component';
|
|
7
|
+
export * from './lib/services/auth.service';
|
|
8
|
+
export * from './lib/services/acl.service';
|
|
9
|
+
export * from './lib/config/auth-service.token';
|
|
10
|
+
export * from './lib/config/acl-service.token';
|
|
11
|
+
export * from './lib/config/library.config';
|
|
12
|
+
export * from './lib/directives/spinner-button';
|
|
13
|
+
export * from './lib/constants/loginConstant';
|