gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 247/459: fix


From: gnunet
Subject: [reclaim-ui] 247/459: fix
Date: Fri, 11 Jun 2021 23:25:39 +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 5695f3cdb5ca831db627f82794e2aaf79f10fa43
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Mon Jul 20 10:37:08 2020 +0200

    fix
---
 src/app/attestation.service.ts                     | 23 +++++++++++++---------
 .../edit-attestations.component.html               |  2 +-
 .../edit-attestations.component.ts                 |  2 +-
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/src/app/attestation.service.ts b/src/app/attestation.service.ts
index e4acb79..d5cff4c 100644
--- a/src/app/attestation.service.ts
+++ b/src/app/attestation.service.ts
@@ -28,13 +28,18 @@ export class AttestationService {
         else {
             redirectUri = "https://ui.reclaim";;
         }
-
-        var scopeValues = '';
-        scopes.forEach(scope => {
-            if (scope.chosen){
-                scopeValues = scopeValues + ' ' + scope.scope;
-            }
-        });
+        if (scopes.length == 0){
+            scopeValues = 'openid profile'
+        }
+        else{
+            var scopeValues = '';
+            scopes.forEach(scope => {
+               if (scope.chosen){
+                   scopeValues = scopeValues + ' ' + scope.scope;
+               }
+            });
+            scopeValues = scopeValues.slice(1);
+        }
         console.log(scopeValues);
 
         const authCodeFlowConfig: AuthConfig = {
@@ -64,13 +69,13 @@ export class AttestationService {
           // The first four are defined by OIDC.
           // Important: Request offline_access to get a refresh token
           // The api scope is a usecase specific one
-          scope: scopeValues.slice(1),
+          scope: scopeValues,
       
           showDebugInformation: true,  
 
           requireHttps: false,
         };
-    
+        console.log(authCodeFlowConfig.scope);
         return authCodeFlowConfig;
     }
 
diff --git a/src/app/edit-attestations/edit-attestations.component.html 
b/src/app/edit-attestations/edit-attestations.component.html
index f7bf98f..0deae07 100644
--- a/src/app/edit-attestations/edit-attestations.component.html
+++ b/src/app/edit-attestations/edit-attestations.component.html
@@ -19,7 +19,7 @@
       <div *ngIf="!isValidEmailforDiscovery()" class="alert alert-primary 
alert-dismissible fade show" role="alert">
         <span class="fa fa-warning"></span> This account is not compatible 
with re:claimID.
       </div>
-      <div *ngIf="!newIdProviderDiscovered()" class="my-2 col-lg-4">
+      <div *ngIf="!newIdProviderDiscovered()" class="my-2 col-lg-6">
         <input placeholder="E-Mail Adress" [(ngModel)]="webfingerEmail">
         <button *ngIf="!newIdProviderDiscovered()" class="btn btn-primary mb-4 
fhg-link" (click)="discoverIdProvider()">
           <span class="fa fa-search"></span> Check compatibility
diff --git a/src/app/edit-attestations/edit-attestations.component.ts 
b/src/app/edit-attestations/edit-attestations.component.ts
index a139cf8..011bf80 100644
--- a/src/app/edit-attestations/edit-attestations.component.ts
+++ b/src/app/edit-attestations/edit-attestations.component.ts
@@ -97,7 +97,6 @@ export class EditAttestationsComponent implements OnInit {
     this.newAttestation.value = this.oauthService.getAccessToken();
     this.reclaimService.addAttestation(this.identity, 
this.newAttestation).subscribe(res => {
       console.log("Saved Attestation");
-      console.log(res);
       this.resetNewIdProvider();
       this.resetScopes();
       this.updateAttestations();
@@ -335,6 +334,7 @@ export class EditAttestationsComponent implements OnInit {
   }
 
   loginFhgAccount(){
+    this.configureOauthService();
     this.oauthService.loadDiscoveryDocumentAndLogin();
   }
 

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