fix(console): update dependencies, force reauth on invalid token (#2267)

* fix: update oidc lib, force reauth

* chore(console): deps (#2302)

* cli core

* cdk material

* chore(deps-dev): bump @types/node from 15.12.2 to 16.7.6 in /console (#2284)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.2 to 16.7.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ts-node from 10.2.0 to 10.2.1 in /console (#2252)

Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.0 to 10.2.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.0...v10.2.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* audit fix

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Max Peintner 2021-09-14 09:04:14 +02:00 committed by GitHub
parent 490cafa538
commit 33a2054be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1169 additions and 1844 deletions

2793
console/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,25 +10,25 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~12.2.0",
"@angular/cdk": "~12.2.0",
"@angular/common": "~12.2.0",
"@angular/compiler": "~12.2.0",
"@angular/core": "~12.2.0",
"@angular/forms": "~12.2.0",
"@angular/material": "^12.1.1",
"@angular/material-moment-adapter": "^12.2.0",
"@angular/platform-browser": "~12.2.0",
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"@angular/service-worker": "~12.2.0",
"@angular/animations": "~12.2.4",
"@angular/cdk": "~12.2.4",
"@angular/common": "~12.2.4",
"@angular/compiler": "~12.2.4",
"@angular/core": "~12.2.4",
"@angular/forms": "~12.2.4",
"@angular/material": "^12.2.4",
"@angular/material-moment-adapter": "^12.2.4",
"@angular/platform-browser": "~12.2.4",
"@angular/platform-browser-dynamic": "~12.2.4",
"@angular/router": "~12.2.4",
"@angular/service-worker": "~12.2.4",
"@grpc/grpc-js": "^1.3.2",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@types/file-saver": "^2.0.2",
"@types/google-protobuf": "^3.15.3",
"@types/uuid": "^8.3.0",
"angular-oauth2-oidc": "^10.0.3",
"angular-oauth2-oidc": "^12.1.0",
"angularx-qrcode": "^11.0.0",
"cors": "^2.8.5",
"file-saver": "^2.0.5",
@ -48,13 +48,13 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.1.1",
"@angular/cli": "~12.2.0",
"@angular/compiler-cli": "~12.2.0",
"@angular/language-service": "~12.2.0",
"@angular-devkit/build-angular": "~12.2.4",
"@angular/cli": "~12.2.4",
"@angular/compiler-cli": "~12.2.4",
"@angular/language-service": "~12.2.4",
"@types/jasmine": "~3.8.2",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^15.12.1",
"@types/node": "^16.7.6",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~7.0.0",
@ -68,7 +68,7 @@
"stylelint": "^13.10.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.20.1",
"ts-node": "~10.2.0",
"ts-node": "~10.2.1",
"tslint": "~6.1.3",
"typescript": "^4.2.4"
}

View File

@ -37,6 +37,7 @@ export class AuthenticationService {
public async authenticate(
partialConfig?: Partial<AuthConfig>,
force: boolean = false,
): Promise<boolean> {
if (partialConfig) {
Object.assign(this.authConfig, partialConfig);
@ -47,8 +48,7 @@ export class AuthenticationService {
await this.oauthService.loadDiscoveryDocumentAndTryLogin();
this._authenticated = this.oauthService.hasValidAccessToken();
if (!this.oauthService.hasValidIdToken() || !this.authenticated || partialConfig) {
if (!this.oauthService.hasValidIdToken() || !this.authenticated || partialConfig || force) {
const newState = await this.statehandler.createState().toPromise();
this.oauthService.initCodeFlow(newState);
}

View File

@ -61,7 +61,7 @@ export class AuthInterceptor<TReq = unknown, TResp = unknown> implements UnaryIn
dialogRef.afterClosed().pipe(take(1)).subscribe(resp => {
if (resp) {
this.authenticationService.authenticate(undefined);
this.authenticationService.authenticate(undefined, true);
}
});
}