Skip to content

Commit

Permalink
route to verify after receiving presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
F-Node-Karlsruhe committed Mar 15, 2023
1 parent 5de8720 commit eb86dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ VC Verifier Changelog
WIP
---

1.4.0 (2023-03-15)
---

- add OpenId4VP functionality


Expand Down
10 changes: 5 additions & 5 deletions frontend/src/views/PresentationRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
class="form-select" aria-label="Credential Type">
<option selected :value="undefined">All</option>
<option value="ProductPassportCredential">Product Passport Credential</option>
<option value="GS1GLNCredential">GS1 GLN Credential</option>
</select>
<label for="credentialType" class="form-label text-muted ms-1"><small>Credential type</small></label>
</div>
Expand Down Expand Up @@ -128,10 +129,12 @@ export default {
if (this.presentationRequestId) {
this.$api.get(this.$store.state.OPENID_ENDPOINT + 'presentation' + this.getRequestPath())
.then((res) => {
console.log(res.data)
clearInterval(this.intervalId)
this.intervalId = undefined
// TODO store presentation and route to verify
const presentationResponse = res.data
const presentation = typeof presentationResponse.vp_token == 'string' ? JSON.parse(presentationResponse.vp_token) : presentationResponse.vp_token;
this.$store.dispatch("addVerifiables", [presentation])
.then(() => this.$router.push({ path: '/verify' }));
})
.catch((error) => {
if (error.response.status != 404) {
Expand All @@ -148,9 +151,6 @@ export default {
getRequestPath() {
return this.presentationRequestId ? '/' + this.presentationRequestId : '';
},
submitFile() {
this.$router.push({ path: '/verify' })
},
registerPresentationRequest() {
this.generating = true
this.$api.post(this.$store.state.OPENID_ENDPOINT + 'request' + this.getRequestPath(), this.presentationRequest)
Expand Down

0 comments on commit eb86dbc

Please sign in to comment.