diff options
author | anna wimbauer <anna.wibauer@gmx.de> | 2020-10-26 15:30:02 +0100 |
---|---|---|
committer | anna wimbauer <anna.wibauer@gmx.de> | 2020-10-26 15:30:02 +0100 |
commit | 4e807e24d99ba0ae0a11e27d4b6edf308c2e6dff (patch) | |
tree | 3743ec7d0e2fe14e8eaba1c5f632aec363de5703 | |
parent | 3eb7e4f33f6da5a0d76abdca65c0e0c84fd62316 (diff) | |
download | reclaim-ui-4e807e24d99ba0ae0a11e27d4b6edf308c2e6dff.tar.gz reclaim-ui-4e807e24d99ba0ae0a11e27d4b6edf308c2e6dff.zip |
redirect at api request
-rw-r--r-- | src/app/identity-list/identity-list.component.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/app/identity-list/identity-list.component.ts b/src/app/identity-list/identity-list.component.ts index b36f10d..aada8b2 100644 --- a/src/app/identity-list/identity-list.component.ts +++ b/src/app/identity-list/identity-list.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { ActivatedRoute, Router } from '@angular/router'; | 2 | import { ActivatedRoute, Router, UrlHandlingStrategy } from '@angular/router'; |
3 | 3 | ||
4 | import { Attribute } from '../attribute'; | 4 | import { Attribute } from '../attribute'; |
5 | import { Credential } from '../credential'; | 5 | import { Credential } from '../credential'; |
@@ -71,7 +71,7 @@ export class IdentityListComponent implements OnInit { | |||
71 | var user = localStorage.getItem('userForCredential'); | 71 | var user = localStorage.getItem('userForCredential'); |
72 | this.router.navigate(['/edit-credentials', user]); | 72 | this.router.navigate(['/edit-credentials', user]); |
73 | } | 73 | } |
74 | if (!this.oidcService.inOpenIdFlow()) { | 74 | if (!this.oidcService.inOpenIdFlow() && undefined == this.route.snapshot.queryParams["authz_request"]) { |
75 | this.oidcService.parseRouteParams(this.route.snapshot.queryParams); | 75 | this.oidcService.parseRouteParams(this.route.snapshot.queryParams); |
76 | if (this.oidcService.inOpenIdFlow()) { | 76 | if (this.oidcService.inOpenIdFlow()) { |
77 | this.router.navigate(['/authorization-request']); | 77 | this.router.navigate(['/authorization-request']); |
@@ -381,7 +381,14 @@ export class IdentityListComponent implements OnInit { | |||
381 | this.connected = true; | 381 | this.connected = true; |
382 | 382 | ||
383 | if(undefined !== this.route.snapshot.queryParams["authz_request"]){ | 383 | if(undefined !== this.route.snapshot.queryParams["authz_request"]){ |
384 | return {"redirectUrl": "http://localhost:7776" + this.route.snapshot.queryParams["pathname"] + this.route.snapshot.queryParams["search"]}; | 384 | var url = "http://localhost:7776" + this.route.snapshot.queryParams["pathname"] + "?"; |
385 | var params = this.route.snapshot.queryParams; | ||
386 | Object.keys(params).forEach(param =>{ | ||
387 | if (param != "authz_request" && param != "pathname"){ | ||
388 | url = url + param + "=" + params[param] + "&"; | ||
389 | } | ||
390 | }) | ||
391 | window.location.href = url; | ||
385 | } | 392 | } |
386 | }, | 393 | }, |
387 | error => { | 394 | error => { |