Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
use vcType to request credential
Browse files Browse the repository at this point in the history
  • Loading branch information
severinstampler committed Jan 16, 2023
1 parent 1cf0a11 commit 82ff3a5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<p class="lead text-muted">
Connect your wallet and share<br>your credentials to access services. </p>
<p>
<a :href="getPresentationUrl(wallets[0].id, vidSchemaUri)"
<a :href="getPresentationUrl(wallets[0].id, vidType)"
class="btn btn-primary my-2 fw-bold _btn">Connect Wallet using <b>Verifiable ID</b></a>
<a :href="'/xdevice/' + encodeURIComponent(vidSchemaUri)"
<a :href="'/xdevice/' + encodeURIComponent(vidType)"
class="btn btn-primary my-2 fw-bold _btn"><i class="bi bi-upc-scan" /></a>

<a :href="getPresentationUrl(wallets[0].id, vidSchemaUri1)"
<a :href="getPresentationUrl(wallets[0].id, obcType)"
class="btn btn-primary my-2 fw-bold _btn">Connect Wallet using <b>Open Badge Credential</b></a>

<a :href="getPresentationUrl(wallets[0].id, bidSchemaUri)"
<a :href="getPresentationUrl(wallets[0].id, bidType)"
class="btn btn-success my-2 fw-bold _btn">Connect Wallet using <b>Bank ID</b></a>
</p>
<p class="text-muted fw-bold"> {{ $config.copyright }} </p>
Expand All @@ -41,9 +41,9 @@ import { config } from "../config";
export default {
data() {
return {
vidSchemaUri1: "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json",
vidSchemaUri: 'https://api.preprod.ebsi.eu/trusted-schemas-registry/v1/schemas/0xb77f8516a965631b4f197ad54c65a9e2f9936ebfb76bae4906d33744dbcc60ba',
bidSchemaUri: 'https://raw.githubusercontent.com/walt-id/waltid-ssikit-vclib/master/src/test/resources/schemas/EuropeanBankIdentity.json'
obcType: "OpenBadgeCredential",
vidType: 'VerifiableId',
bidType: 'EuropeanBankIdentity'
}
},
async asyncData({ $axios }) {
Expand All @@ -54,8 +54,8 @@ export default {
encodeURIComponent(str) {
return encodeURIComponent(str)
},
getPresentationUrl(walletId, schemaUri) {
return `/verifier-api/${config.tenantId}/present/?walletId=${walletId}&schemaUri=${schemaUri}`
getPresentationUrl(walletId, type) {
return `/verifier-api/${config.tenantId}/present/?walletId=${walletId}&vcType=${type}`
}
}
}
Expand Down

0 comments on commit 82ff3a5

Please sign in to comment.