gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 206/459: attestation name added


From: gnunet
Subject: [reclaim-ui] 206/459: attestation name added
Date: Fri, 11 Jun 2021 23:24:58 +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 5f1b7134420c33e85bb1cf64f1bb56e97619f7f3
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Tue Jun 2 14:41:47 2020 +0200

    attestation name added
---
 src/app/edit-identity/edit-identity.component.ts | 15 ++++++++++++---
 src/app/oauth-helper.service.ts                  |  2 +-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index c29ce4a..5ee56fe 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -640,7 +640,6 @@ export class EditIdentityComponent implements OnInit {
       }
       console.log (error);
     });
-    //window.location.href = 
"http://localhost:4567/authorize?redirect_uri=http%3A%2F%2Flocalhost:4200%2Findex.html&client_id=reclaimid&response_type=code&scopes=openid";;
   }
 
   isValidEmailforDiscovery(){
@@ -666,7 +665,7 @@ export class EditIdentityComponent implements OnInit {
     this.oauthService.configure(authCodeFlowConfig);
     this.oauthService.loadDiscoveryDocumentAndLogin();
     this.getId();
-    //window.location.href = 
"http://localhost:4567/authorize?redirect_uri=http%3A%2F%2Flocalhost:4200%2Findex.html&client_id=reclaimid&response_type=code&scopes=openid";;
+    this.addAttestation();
   }
 
   getId (): any{
@@ -674,7 +673,17 @@ export class EditIdentityComponent implements OnInit {
   }
 
   addAttestation(){
-    
+    const newAttestation = new Attestation (this.getId().name, 
this.getId().id, this.getId().type, 'openID', this.idProvider, 
this.getAttestationExpiration(), []);
+    this.reclaimService.addAttestation(this.identity, 
newAttestation).subscribe(res => {
+      console.log(res);
+    },
+    err => {
+      console.log(err);
+    });
+  }
+
+  getAttestationExpiration(){
+    return this.oauthService.getIdTokenExpiration()
   }
 
   setExperimental(set) {
diff --git a/src/app/oauth-helper.service.ts b/src/app/oauth-helper.service.ts
index 5f54b3a..68c64fd 100644
--- a/src/app/oauth-helper.service.ts
+++ b/src/app/oauth-helper.service.ts
@@ -12,7 +12,7 @@ export class OauthHelperService {
       issuer: localStorage.getItem('idProvider'),
   
       // URL of the SPA to redirect the user to after login
-      redirectUri: window.location.origin,
+      redirectUri: window.location.href,
   
       // The SPA's id. The SPA is registerd with this id at the auth-server
       // clientId: 'server.code',

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