gnunet-svn
[Top][All Lists]
Advanced

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

[reclaim-ui] 218/459: login works properly


From: gnunet
Subject: [reclaim-ui] 218/459: login works properly
Date: Fri, 11 Jun 2021 23:25:10 +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 51e33c85b4102c2ce28911b06dd59c810e96f714
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Wed Jun 17 15:32:31 2020 +0200

    login works properly
---
 src/app/edit-identity/edit-identity.component.html |  2 +-
 src/app/edit-identity/edit-identity.component.ts   | 12 +++++++++---
 src/app/oauth-helper.service.ts                    |  2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index 076b8bb..1a7bba4 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -160,7 +160,7 @@
       <span class="fa fa-warning"></span> No account found with this email
     </div>
     
-    <button *ngIf="isExperimental() && !newIdProviderDiscovered()" class="btn 
btn-primary mb-4 fhg-link" (click)="getFhGAttestation()">
+    <button *ngIf="isExperimental() && !newIdProviderDiscovered()" class="btn 
btn-primary mb-4 fhg-link" (click)="discoverIdProvider()">
       <span class="fa fa-user"></span> Link Fraunhofer Account
     </button>
     <!--Link account-->
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 392ba21..96e982d 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -49,7 +49,7 @@ export class EditIdentityComponent implements OnInit {
               private router: Router,
               private webfingerService: WebfingerService,
               private oauthService: OAuthService,
-              private oauthHelperService: OauthHelperService) { }
+              private oauthHelperService: OauthHelperService) {}
 
   ngOnInit() {
     this.attributes = [];
@@ -64,6 +64,12 @@ export class EditIdentityComponent implements OnInit {
     this.newAttribute = new Attribute('', '', '', '', 'STRING', '');
     this.newAttested = new Attribute('', '', '', '', 'STRING', '');
     this.newAttestation = new Attestation('', '', '', 'JWT', '', null, []);
+
+    if (this.newIdProvider !== ''){
+      
this.oauthService.configure(this.oauthHelperService.getOauthConfig(this.newIdProvider));
+      this.oauthService.loadDiscoveryDocumentAndTryLogin();
+    }
+
     if (undefined !== this.activatedRoute.snapshot.queryParams["experiments"]) 
{
       this.setExperimental("true" === 
this.activatedRoute.snapshot.queryParams["experiments"]);
     }
@@ -627,7 +633,7 @@ export class EditIdentityComponent implements OnInit {
     return "?";
   }
 
-  getFhGAttestation() {
+  discoverIdProvider() {
     this.logOutFromOauthService();
     if (this.webfingerEmail == ''){
       return;
@@ -683,6 +689,7 @@ export class EditIdentityComponent implements OnInit {
     var authCodeFlowConfig = 
this.oauthHelperService.getOauthConfig(this.newIdProvider);
     this.oauthService.configure(authCodeFlowConfig);
     this.oauthService.loadDiscoveryDocumentAndLogin();
+    this.getId();
   }
 
   saveIdProviderinLocalStorage(){
@@ -764,7 +771,6 @@ export class EditIdentityComponent implements OnInit {
       }
       
     });
-    console.log(this.authorizations);
   }
 
   logOutFromOauthService(){
diff --git a/src/app/oauth-helper.service.ts b/src/app/oauth-helper.service.ts
index 0ffadb0..dc1dcce 100644
--- a/src/app/oauth-helper.service.ts
+++ b/src/app/oauth-helper.service.ts
@@ -32,7 +32,7 @@ export class OauthHelperService {
       // The api scope is a usecase specific one
       scope: 'openid profile omejdn:api',
   
-      showDebugInformation: true,
+      showDebugInformation: true,  
     };
 
     return authCodeFlowConfig;

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