@annalib/anna-cognito-lib 1.1.1 → 1.1.3
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/services/auth.service.mjs +6 -6
- package/fesm2015/annalib-anna-cognito-lib.mjs +3 -3
- package/fesm2015/annalib-anna-cognito-lib.mjs.map +1 -1
- package/fesm2020/annalib-anna-cognito-lib.mjs +7 -7
- package/fesm2020/annalib-anna-cognito-lib.mjs.map +1 -1
- package/lib/services/auth.service.d.ts +5 -5
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, Injectable, Inject, Directive, Input, Component, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import * as i3$1 from '@angular/common/http';
|
|
5
6
|
import * as i3 from '@angular/router';
|
|
6
7
|
import { RouterModule } from '@angular/router';
|
|
7
|
-
import * as i3$1 from '@angular/common/http';
|
|
8
8
|
import { CognitoUserPool, CognitoUser, AuthenticationDetails } from 'amazon-cognito-identity-js';
|
|
9
9
|
import * as i4 from 'ngx-toastr';
|
|
10
10
|
import * as i4$1 from '@angular/common';
|
|
@@ -62,6 +62,12 @@ LoginConstant.loginPageUrl = "/login";
|
|
|
62
62
|
LoginConstant.homePageUrl = "/dashboard";
|
|
63
63
|
LoginConstant.stationSettingUrl = "/station-settings";
|
|
64
64
|
|
|
65
|
+
/** Token to inject the auth service */
|
|
66
|
+
const AUTH_SERVICE_TOKEN = new InjectionToken('Auth service token');
|
|
67
|
+
|
|
68
|
+
/** Token to inject the auth service */
|
|
69
|
+
const CONFIG_SERVICE_TOKEN = new InjectionToken('Cognito config service token');
|
|
70
|
+
|
|
65
71
|
class AuthenticationData {
|
|
66
72
|
constructor(Username, Password) {
|
|
67
73
|
this.Username = Username;
|
|
@@ -113,12 +119,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
113
119
|
args: [ACL_SERVICE_TOKEN]
|
|
114
120
|
}] }]; } });
|
|
115
121
|
|
|
116
|
-
/** Token to inject the auth service */
|
|
117
|
-
const AUTH_SERVICE_TOKEN = new InjectionToken('Auth service token');
|
|
118
|
-
|
|
119
|
-
/** Token to inject the auth service */
|
|
120
|
-
const CONFIG_SERVICE_TOKEN = new InjectionToken('Cognito config service token');
|
|
121
|
-
|
|
122
122
|
// Angular import statements
|
|
123
123
|
class AnnaLibAuthService {
|
|
124
124
|
constructor(router, aclService, httpClient, toastr, consumingProjectAuthService, consumingProjectConfigService) {
|