monkey-front-core 0.0.356 → 0.0.357
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/core/services/auth/monkeyecx-auth-guard-role.service.mjs +7 -7
- package/fesm2015/monkey-front-core.mjs +5 -5
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +5 -5
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/auth/monkeyecx-auth-guard-role.service.d.ts +3 -3
- package/monkey-front-core-0.0.357.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.356.tgz +0 -0
|
@@ -4118,8 +4118,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4118
4118
|
}], ctorParameters: function () { return [{ type: MonkeyEcxAuthenticationService }]; } });
|
|
4119
4119
|
|
|
4120
4120
|
class MonkeyEcxAuthGuardByRole {
|
|
4121
|
-
constructor(
|
|
4122
|
-
this.
|
|
4121
|
+
constructor(tokenStorage, router) {
|
|
4122
|
+
this.tokenStorage = tokenStorage;
|
|
4123
4123
|
this.router = router;
|
|
4124
4124
|
this.securityCredentials = null;
|
|
4125
4125
|
this.tokenCredentials = null;
|
|
@@ -4175,7 +4175,7 @@ class MonkeyEcxAuthGuardByRole {
|
|
|
4175
4175
|
if (this.securityCredentials) {
|
|
4176
4176
|
const { roles, byExclusion } = this.securityCredentials;
|
|
4177
4177
|
if (!this.tokenCredentials) {
|
|
4178
|
-
this.tokenCredentials = await this.
|
|
4178
|
+
this.tokenCredentials = await this.tokenStorage.getToken();
|
|
4179
4179
|
}
|
|
4180
4180
|
console.log('this.tokenCredentials');
|
|
4181
4181
|
console.log(this.tokenCredentials);
|
|
@@ -4190,14 +4190,14 @@ class MonkeyEcxAuthGuardByRole {
|
|
|
4190
4190
|
return true;
|
|
4191
4191
|
}
|
|
4192
4192
|
}
|
|
4193
|
-
MonkeyEcxAuthGuardByRole.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAuthGuardByRole, deps: [{ token:
|
|
4193
|
+
MonkeyEcxAuthGuardByRole.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAuthGuardByRole, deps: [{ token: MonkeyEcxTokenStorageService }, { token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4194
4194
|
MonkeyEcxAuthGuardByRole.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAuthGuardByRole, providedIn: 'root' });
|
|
4195
4195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAuthGuardByRole, decorators: [{
|
|
4196
4196
|
type: Injectable,
|
|
4197
4197
|
args: [{
|
|
4198
4198
|
providedIn: 'root'
|
|
4199
4199
|
}]
|
|
4200
|
-
}], ctorParameters: function () { return [{ type:
|
|
4200
|
+
}], ctorParameters: function () { return [{ type: MonkeyEcxTokenStorageService }, { type: i2$2.Router }]; } });
|
|
4201
4201
|
|
|
4202
4202
|
class MonkeyEcxAuthGuard {
|
|
4203
4203
|
constructor(monkeyecxAuthenticationService) {
|