[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 185/459: minor fixes
From: |
gnunet |
Subject: |
[reclaim-ui] 185/459: minor fixes |
Date: |
Fri, 11 Jun 2021 23:24:37 +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 3f36d635502e1e1f7014c7a7d4d0b1d87f700a0d
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Thu Feb 6 16:14:08 2020 +0100
minor fixes
---
.../edit-attestations.component.ts | 27 +++++++++++-----------
src/app/edit-identity/edit-identity.component.css | 11 +++++++++
src/app/edit-identity/edit-identity.component.html | 4 ++++
src/app/edit-identity/edit-identity.component.ts | 7 +++++-
4 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/src/app/edit-attestations/edit-attestations.component.ts
b/src/app/edit-attestations/edit-attestations.component.ts
index 04df369..713128a 100644
--- a/src/app/edit-attestations/edit-attestations.component.ts
+++ b/src/app/edit-attestations/edit-attestations.component.ts
@@ -39,23 +39,24 @@ export class EditAttestationsComponent implements OnInit {
if (ids[i].name == p['id']) {
this.identity = ids[i];
this.updateAttestation();
+ let code = localStorage.getItem('attestationCode');
+ if (undefined !== code) {
+ console.log(code);
+ this.reclaimService.fixmeExchangeCode(code).subscribe(response
=> {
+ if (undefined !== response["id_token"]) {
+ this.newAttestation.value = response["id_token"];
+ this.newAttestation.type = "JWT";
+ this.newAttestation.name = "FraunhoferAISEC";
+ this.addAttestation();
+ localStorage.setItem('attestationCode', null);
+ this.router.navigate(['/edit-identity',
this.identity.name]);
+ }
+ });;
+ }
}
}
});
});
- let code = localStorage.getItem('attestationCode');
- if (undefined !== code) {
- console.log(code);
- this.reclaimService.fixmeExchangeCode(code).subscribe(response => {
- if (undefined !== response["id_token"]) {
- this.newAttestation.value = response["id_token"];
- this.newAttestation.type = "JWT";
- this.newAttestation.name = "FraunhoferAISEC";
- this.addAttestation();
- localStorage.setItem('attestationCode', null);
- }
- });;
- }
}
private updateAttestation() {
diff --git a/src/app/edit-identity/edit-identity.component.css
b/src/app/edit-identity/edit-identity.component.css
index e69de29..58a74cc 100644
--- a/src/app/edit-identity/edit-identity.component.css
+++ b/src/app/edit-identity/edit-identity.component.css
@@ -0,0 +1,11 @@
+button.fhg-link {
+ background-color: #009374;
+ border: 2px solid #fff;
+ color: #fff;
+}
+
+button.fhg-link:hover {
+ background-color: #fff;
+ border: 2px solid #009374;
+ color: #009374;
+}
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 1c42501..a6c1db5 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -141,6 +141,10 @@
<li>IDs and values may not be empty!</li>
</ul>
</div>
+ <button class="btn btn-primary mb-4 fhg-link"
(click)="getFhGAttestation()">
+ <span class="fa fa-user"></span> Link Fraunhofer Account
+ </button>
+ <hr/>
<!-- Edit card buttons -->
<div>
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index 2cdc05c..76fbdc9 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -291,7 +291,7 @@ export class EditIdentityComponent implements OnInit {
if (attribute.name.indexOf(' ') >= 0) {
return false;
}
- if (!/^[a-zA-Z0-9-]+$/.test(attribute.name)) {
+ if (!/^[a-zA-Z0-9-_]+$/.test(attribute.name)) {
return false;
}
return !this.isInConflict(attribute);
@@ -661,4 +661,9 @@ export class EditIdentityComponent implements OnInit {
}
}
+ getFhGAttestation() {
+ localStorage.setItem('userForAttestation', this.identity.name);
+ window.location.href =
"http://localhost:4567/authorize?redirect_uri=http%3A%2F%2Flocalhost:4200%2Findex.html&client_id=reclaimid&response_type=code&scopes=openid";
+ }
+
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 174/459: fix build, (continued)
- [reclaim-ui] 174/459: fix build, gnunet, 2021/06/11
- [reclaim-ui] 177/459: fix getter, gnunet, 2021/06/11
- [reclaim-ui] 168/459: actually initiate verify, gnunet, 2021/06/11
- [reclaim-ui] 197/459: link to fhg account, gnunet, 2021/06/11
- [reclaim-ui] 167/459: more refactoring and cleanup, gnunet, 2021/06/11
- [reclaim-ui] 175/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 181/459: actually fix reference name display, gnunet, 2021/06/11
- [reclaim-ui] 200/459: webfinger, gnunet, 2021/06/11
- [reclaim-ui] 170/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 205/459: login via omejdn:api works, gnunet, 2021/06/11
- [reclaim-ui] 185/459: minor fixes,
gnunet <=
- [reclaim-ui] 206/459: attestation name added, gnunet, 2021/06/11
- [reclaim-ui] 186/459: update to new API and structure, gnunet, 2021/06/11
- [reclaim-ui] 208/459: store idProvider/Attestation(not working), gnunet, 2021/06/11
- [reclaim-ui] 207/459: improved emailNotFoundAlert, gnunet, 2021/06/11
- [reclaim-ui] 193/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 189/459: experimental switch added, gnunet, 2021/06/11
- [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