From 5e3b7354e4bca7e733e464974a27c4064cb0a276 Mon Sep 17 00:00:00 2001 From: VitoAlbano Date: Mon, 14 Oct 2024 14:13:05 +0100 Subject: [PATCH] Moved the JWT storage injection token at app level --- app/src/app/app.module.ts | 5 ++-- package-lock.json | 60 +++++++++++++++++++-------------------- package.json | 12 ++++---- 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/app/src/app/app.module.ts b/app/src/app/app.module.ts index 2880ea729f..9d7ed37953 100644 --- a/app/src/app/app.module.ts +++ b/app/src/app/app.module.ts @@ -25,7 +25,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { AuthGuard, AuthModule, CoreModule, TRANSLATION_PROVIDER } from '@alfresco/adf-core'; +import { AuthGuard, AuthModule, CoreModule, JWT_STORAGE_SERVICE, StorageService, TRANSLATION_PROVIDER } from '@alfresco/adf-core'; import { AppService } from '@alfresco/aca-shared'; import { AppExtensionsModule } from './extensions.module'; @@ -111,7 +111,8 @@ registerLocaleData(localeSv); name: 'app', source: 'assets' } - } + }, + { provide: JWT_STORAGE_SERVICE, useClass: StorageService } ], declarations: [AppComponent], bootstrap: [AppComponent] diff --git a/package-lock.json b/package-lock.json index e262f5538c..2ac310bfbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,11 @@ "version": "6.0.0", "license": "LGPL-3.0", "dependencies": { - "@alfresco/adf-content-services": "7.0.0-alpha.4-11234797160", - "@alfresco/adf-core": "7.0.0-alpha.4-11234797160", - "@alfresco/adf-extensions": "7.0.0-alpha.4-11234797160", - "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11234797160", - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/adf-content-services": "7.0.0-alpha.4-11327773511", + "@alfresco/adf-core": "7.0.0-alpha.4-11327773511", + "@alfresco/adf-extensions": "7.0.0-alpha.4-11327773511", + "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11327773511", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "@angular/animations": "16.2.9", "@angular/cdk": "16.2.9", "@angular/common": "16.2.9", @@ -41,7 +41,7 @@ "zone.js": "0.13.3" }, "devDependencies": { - "@alfresco/adf-cli": "7.0.0-alpha.4-11234797160", + "@alfresco/adf-cli": "7.0.0-alpha.4-11327773511", "@angular-devkit/build-angular": "16.2.9", "@angular-devkit/core": "16.2.9", "@angular-devkit/schematics": "16.2.9", @@ -106,12 +106,12 @@ "dev": true }, "node_modules/@alfresco/adf-cli": { - "version": "7.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-CGEMrAnbrZniDsZJnrrmFRzjBbpImG76NlkGN7fEuch46zX5FGvv5RQXDcBRCYNoLhg4SXzSkRX4U+QqvNOWrA==", + "version": "7.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-/VeaaV8bvGUyJV3CEDNhBAbJ9c/A6wIB/19Ktlvfa3WXAqNBKRMxTzOxMF5Ah7Q7T3DBtv2fsm0BduyHDAw33g==", "dev": true, "dependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "commander": "^6.2.1", "ejs": "^3.1.9", "license-checker": "^25.0.1", @@ -144,15 +144,15 @@ "dev": true }, "node_modules/@alfresco/adf-content-services": { - "version": "7.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-mT+q86xfOP7bY784zP3+urgaCWmn0mjnKmjH3ZSsE9HCgeBYkS2JA1Q8VKidC64HLkBVifuAE14Bai0EbqHXPg==", + "version": "7.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-lHy5FUFyFDDwEHmHnF/jgyayh9GzGFBmTuiiTopzwGpytv7NSCTIT29Qm4PUv0IXwtDgwaJ+IxWVlwYw/Q+6lA==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/adf-core": ">=7.0.0-alpha.4-11234797160", - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/adf-core": ">=7.0.0-alpha.4-11327773511", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "@angular/animations": ">=14.1.3", "@angular/cdk": ">=14.1.2", "@angular/common": ">=14.1.3", @@ -167,9 +167,9 @@ } }, "node_modules/@alfresco/adf-core": { - "version": "7.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-cApAM8ahz+3mSH0aNrwhsPPr0cOu0gO7cetH5pKWyWTftqeDl+thcH01641y0nbnEn0dtIXATlK87JjwtyZ7qg==", + "version": "7.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-Jza5KZLAPFwV5jiEF908BpuzqV05JYMI6uvjDmMkucP6d8792OVaKdOlINyFhFhKOhAveNaoetU9S01Mu1LF1Q==", "dependencies": { "angular-oauth2-oidc": "^15.0.1", "angular-oauth2-oidc-jwks": "^17.0.2", @@ -177,8 +177,8 @@ "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/adf-extensions": ">=7.0.0-alpha.4-11234797160", - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/adf-extensions": ">=7.0.0-alpha.4-11327773511", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "@angular/animations": ">=14.1.3", "@angular/cdk": ">=14.1.2", "@angular/common": ">=14.1.3", @@ -194,31 +194,31 @@ } }, "node_modules/@alfresco/adf-extensions": { - "version": "7.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-ajOF9DwVNiFlg3DLBCVNm46hAHy+uubyTT9sq/GLE9bLyJd5yNqL22Z14irM1JHMiPUJ5lY3wpNzwySCJA2UJA==", + "version": "7.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-WYHJ22cWgYNomea32wmQoCdgZZHfEqcWaiThoveUoEk3r8aCMnHDantcdKOqZpqVAq/acjKtHM0kthRNHZTDJQ==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "@angular/common": ">=14.1.3", "@angular/core": ">=14.1.3" } }, "node_modules/@alfresco/eslint-plugin-eslint-angular": { - "version": "7.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-1qn+b2VBnkvGCXJ7P5HBm9NF2wzkUyZlRNYX0tkEJEenpCGgzKKkkBOB5ut07HTHGHXJJeAZ+GAYP4a3LVVThg==", + "version": "7.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-phTKt2CHPt2naBB5xdib9lfg5OZpkF0VqNVWiQD+u0d+YE+nROav881nTnmE7iS6ZReI9iXnqCDjiL6Uk8w8vA==", "dependencies": { "@angular-eslint/utils": "16.0.3", "@typescript-eslint/utils": "5.59.7" } }, "node_modules/@alfresco/js-api": { - "version": "8.0.0-alpha.4-11234797160", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.4-11234797160.tgz", - "integrity": "sha512-HjngYZE5yQmkxv9dpNYjY+n+UC+jEbmCxX7JlRrpuIOMC/efzO6cLP+K2FJFLABcuFGyWBWLhKJNBSUVz6pIKQ==", + "version": "8.0.0-alpha.4-11327773511", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.4-11327773511.tgz", + "integrity": "sha512-BCnay+PTROHODBL6hqdpB/zqD/HsnXhZxfOg0Lco+UvELzJNyGbajbWlB9DxHrpcMDzZ32y0QnxAxvmNjEYT/g==", "dependencies": { "event-emitter": "^0.3.5", "superagent": "^9.0.1", diff --git a/package.json b/package.json index b6e694f98a..f09b70699f 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ }, "private": true, "dependencies": { - "@alfresco/adf-content-services": "7.0.0-alpha.4-11234797160", - "@alfresco/adf-core": "7.0.0-alpha.4-11234797160", - "@alfresco/adf-extensions": "7.0.0-alpha.4-11234797160", - "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11234797160", - "@alfresco/js-api": ">=8.0.0-alpha.4-11234797160", + "@alfresco/adf-content-services": "7.0.0-alpha.4-11327773511", + "@alfresco/adf-core": "7.0.0-alpha.4-11327773511", + "@alfresco/adf-extensions": "7.0.0-alpha.4-11327773511", + "@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.4-11327773511", + "@alfresco/js-api": ">=8.0.0-alpha.4-11327773511", "@angular/animations": "16.2.9", "@angular/cdk": "16.2.9", "@angular/common": "16.2.9", @@ -62,7 +62,7 @@ "zone.js": "0.13.3" }, "devDependencies": { - "@alfresco/adf-cli": "7.0.0-alpha.4-11234797160", + "@alfresco/adf-cli": "7.0.0-alpha.4-11327773511", "@angular-devkit/build-angular": "16.2.9", "@angular-devkit/core": "16.2.9", "@angular-devkit/schematics": "16.2.9",