[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 221/459: logout on server side works #19
From: |
gnunet |
Subject: |
[reclaim-ui] 221/459: logout on server side works #19 |
Date: |
Fri, 11 Jun 2021 23:25:13 +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 9d8d8e7b8024a68c50648cec57eec4bfc7944622
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Mon Jun 22 11:12:06 2020 +0200
logout on server side works #19
---
src/app/attestation.service.ts | 8 ++++----
src/app/edit-identity/edit-identity.component.ts | 23 ++++++++---------------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/app/attestation.service.ts b/src/app/attestation.service.ts
index 920f2ad..67139e4 100644
--- a/src/app/attestation.service.ts
+++ b/src/app/attestation.service.ts
@@ -21,6 +21,10 @@ export class AttestationService {
// URL of the SPA to redirect the user to after login
redirectUri: window.location.href,
+
+ postLogoutRedirectUri: window.location.href,
+
+ logoutUrl: idProvider + '/logout',
// The SPA's id. The SPA is registerd with this id at the auth-server
// clientId: 'server.code',
@@ -46,8 +50,4 @@ export class AttestationService {
return authCodeFlowConfig;
}
- serversideLogout(idProvider: string){
- return this.http.get<any>(idProvider + '/logout');
- }
-
}
\ No newline at end of file
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index 6c7ed24..a28d7e3 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -711,16 +711,20 @@ export class EditIdentityComponent implements OnInit {
this.newIdProvider = '';
localStorage.removeItem('newIdProvider');
this.updateAttestations();
+ this.newAttestation.name = '';
+ this.newAttestation.value = '';
+ this.logOutFromOauthService();
},
err => {
console.log("Failed saving attestation");
console.log(err);
//this.errorInfos.push("Failed to update identity ``" +
this.identityInEdit.name + "''");
EMPTY
+ this.newAttestation.name = '';
+ this.newAttestation.value = '';
+ this.logOutFromOauthService();
});
- this.newAttestation.name = '';
- this.newAttestation.value = '';
- this.logOutFromOauthService
+
}
attestationNameDuplicate(){
@@ -752,7 +756,6 @@ export class EditIdentityComponent implements OnInit {
grantedAccessToIdProvider(){
if (this.oauthService.hasValidAccessToken()){
- console.log("logged in");
return true;
};
return false;
@@ -789,17 +792,7 @@ export class EditIdentityComponent implements OnInit {
if (!this.oauthService.hasValidAccessToken()){
return;
}
- const idProvider = this.oauthService.issuer;
- this.oauthService.logOut();
- this.attestationService.serversideLogout(idProvider).subscribe(res => {
- console.log("logged out on server")},
- error => {
- console.log("serverside logout gone wrong");
- console.log(error);}
- );
- if (!this.oauthService.hasValidAccessToken()){
- console.log("logged out from outhService");
- }
+ this.oauthService.logOut(false);
}
cancleLinking(){
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 191/459: update to angular9; minor bugfixes, (continued)
- [reclaim-ui] 191/459: update to angular9; minor bugfixes, gnunet, 2021/06/11
- [reclaim-ui] 187/459: add issuer display, gnunet, 2021/06/11
- [reclaim-ui] 216/459: idProvider stored in localStorage and loaded to authorization interface, gnunet, 2021/06/11
- [reclaim-ui] 204/459: merge yarn.lock, gnunet, 2021/06/11
- [reclaim-ui] 192/459: minor fixes, gnunet, 2021/06/11
- [reclaim-ui] 195/459: fix parsing claims parameter, gnunet, 2021/06/11
- [reclaim-ui] 218/459: login works properly, gnunet, 2021/06/11
- [reclaim-ui] 188/459: add expiration, gnunet, 2021/06/11
- [reclaim-ui] 198/459: back to where it should be, gnunet, 2021/06/11
- [reclaim-ui] 201/459: started integrating oauthservice for attestation, gnunet, 2021/06/11
- [reclaim-ui] 221/459: logout on server side works #19,
gnunet <=
- [reclaim-ui] 220/459: attestation name duplication prevented + trying to logout on serverside, gnunet, 2021/06/11
- [reclaim-ui] 224/459: random token request deleted, gnunet, 2021/06/11
- [reclaim-ui] 209/459: trying to save accesstoken in localStorage, gnunet, 2021/06/11
- [reclaim-ui] 219/459: merge webfinger-service and oauth-helper-service into attestation-service, gnunet, 2021/06/11
- [reclaim-ui] 230/459: fix webfinger, gnunet, 2021/06/11
- [reclaim-ui] 226/459: nothing important, gnunet, 2021/06/11
- [reclaim-ui] 210/459: new Attestation created, gnunet, 2021/06/11
- [reclaim-ui] 202/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 196/459: issuer discoverable, gnunet, 2021/06/11
- [reclaim-ui] 213/459: Attestation is added after account is linked, gnunet, 2021/06/11