gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-ui] 12/459: implemented functionality for redirecting for acces


From: gnunet
Subject: [reclaim-ui] 12/459: implemented functionality for redirecting for access_denied #2
Date: Fri, 11 Jun 2021 23:21:44 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-ui.

commit 9f2cdd923868a18e44ed0a4ff3c47555b980fec7
Author: kiliant <kiliant@in.tum.de>
AuthorDate: Tue Nov 27 13:16:06 2018 +0100

    implemented functionality for redirecting for access_denied #2
---
 src/app/identity-list/identity-list.component.html | 2 +-
 src/app/identity-list/identity-list.component.ts   | 3 +++
 src/app/open-id.service.ts                         | 5 +++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/app/identity-list/identity-list.component.html 
b/src/app/identity-list/identity-list.component.html
index 29d5a52..bdaf08c 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -4,7 +4,7 @@
   <ul>
     <li *ngFor="let attribute of getScopes()"><strong>{{attribute}}</strong>
   </ul>
-  <button class="btn btn-danger">
+  <button class="btn btn-danger" (click)="cancelRequest()">
     <span class="fa fa-ban"></span> Do not share information and return to 
website
   </button>
 </div>
diff --git a/src/app/identity-list/identity-list.component.ts 
b/src/app/identity-list/identity-list.component.ts
index ad2af4e..2cecbad 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -289,6 +289,9 @@ export class IdentityListComponent implements OnInit {
     });
   }
 
+  cancelRequest() {
+    this.oidcService.cancelAuthorization()
+  }
 
   loginIdentity(identity) {
     this.oidcService.login(identity).subscribe(data => {
diff --git a/src/app/open-id.service.ts b/src/app/open-id.service.ts
index aea428a..9aa986b 100644
--- a/src/app/open-id.service.ts
+++ b/src/app/open-id.service.ts
@@ -36,6 +36,11 @@ export class OpenIdService {
     '&nonce=' + this.params['nonce'];
   }
 
+  cancelAuthorization(): any {
+  window.location.href = this.params['redirect_uri'] + '?error=access_denied' +
+    '&state=' + this.params['state'];
+  }
+
   inOpenIdFlow(): any {
     return this.params['redirect_uri'] !== undefined;
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]