gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 273/459: better requested claim handling


From: gnunet
Subject: [reclaim-ui] 273/459: better requested claim handling
Date: Fri, 11 Jun 2021 23:26:05 +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 f47ba85a743f626611a6a0dea1ee99fe10ab7642
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Fri Aug 7 08:15:58 2020 +0200

    better requested claim handling
---
 src/app/authorization-request/authorization-request.component.html | 4 ++--
 src/app/authorization-request/authorization-request.component.ts   | 4 ++--
 src/app/edit-identity/edit-identity.component.ts                   | 4 +++-
 src/app/open-id.service.ts                                         | 7 +++++++
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/app/authorization-request/authorization-request.component.html 
b/src/app/authorization-request/authorization-request.component.html
index 69de21b..23c0913 100644
--- a/src/app/authorization-request/authorization-request.component.html
+++ b/src/app/authorization-request/authorization-request.component.html
@@ -16,10 +16,10 @@
     <ul>
       <li *ngFor="let attribute of 
getRequestedStandardScopesWithDescription()"><strong>{{attribute}}</strong></li>
     </ul>
-    <div *ngIf="getRequestedNonStandardScopes().length > 0">
+    <div *ngIf="getRequestedNonStandardClaims().length > 0">
       as well as the following additional attributes:
       <ul>
-        <li *ngFor="let attribute of 
getRequestedNonStandardScopes()"><strong>{{attribute}}</strong></li>
+        <li *ngFor="let attribute of 
getRequestedNonStandardClaims()"><strong>{{attribute}}</strong></li>
       </ul>
     </div>
 
diff --git a/src/app/authorization-request/authorization-request.component.ts 
b/src/app/authorization-request/authorization-request.component.ts
index 81f235c..1b5bfe4 100644
--- a/src/app/authorization-request/authorization-request.component.ts
+++ b/src/app/authorization-request/authorization-request.component.ts
@@ -20,8 +20,8 @@ export class AuthorizationRequestComponent implements OnInit {
     return this.oidcService.getRequestedStandardScopesWithDescription();
   }
 
-  getRequestedNonStandardScopes() {
-    return this.oidcService.getRequestedNonStandardScopes();
+  getRequestedNonStandardClaims() {
+    return this.oidcService.getRequestedNonStandardClaims();
   }
 
   isClientVerified() {
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 8331e3a..d4ff83b 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -166,7 +166,9 @@ export class EditIdentityComponent implements OnInit {
   }
 
   updateMissingAttributes() {
-    var claims = this.oidcService.getStandardClaimNames();
+    var sClaims = this.oidcService.getStandardClaimNames();
+    var nsClaims = this.oidcService.getRequestedClaimNames();
+    var claims = [...sClaims, ...nsClaims];
     for (let attr of this.attributes) {
       const j =
         claims.indexOf(attr.name);
diff --git a/src/app/open-id.service.ts b/src/app/open-id.service.ts
index c4a26fd..b1b59da 100644
--- a/src/app/open-id.service.ts
+++ b/src/app/open-id.service.ts
@@ -173,6 +173,12 @@ export class OpenIdService {
 
   }
 
+  getRequestedNonStandardClaims(): string [] {
+    var scopes = this.getRequestedNonStandardScopes();
+    var claims = this.getRequestedClaimNames();
+    return [...scopes, ...claims];
+  }
+
   getScopesDescriptionList(): any {
     var scopes = this.getRequestedScope();
     var res = [];
@@ -286,6 +292,7 @@ export class OpenIdService {
     if (scopes.includes("phone_number")) {
       result = result.concat(Object.keys(this.getStandardPhoneClaims()));
     }
+    result = result.concat(this.getRequestedNonStandardScopes());
     result = result.concat(this.getRequestedClaimNames());
 
     return result;

-- 
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]