Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #323 from sudeshrshetty/didcommtests
Browse files Browse the repository at this point in the history
chore: follow up for user trust consent
  • Loading branch information
sudeshrshetty authored Aug 30, 2020
2 parents 83dea63 + b1d29dc commit fa28fda
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmd/user-agent/src/pages/chapi/DIDConnect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SPDX-License-Identifier: Apache-2.0
</div>

<md-card-content class="viewport">
Below issuer would like to
This issuer would like to
connect to your wallet for secured communication.
<governance :govn-v-c="govnVC" :request-origin="requestOrigin"/>
</md-card-content>
Expand Down
11 changes: 8 additions & 3 deletions cmd/user-agent/src/pages/chapi/Governance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: Apache-2.0

<template>
<div v-if="govnVC">
<div style="margin: 20px 20%">
<div style="margin-top: 20px" class="center-header">

<md-button class="md-icon-button green-icon-button" v-if="trusted" @click="displayTrustConsent">
<md-icon class="black-icon">verified
Expand Down Expand Up @@ -74,7 +74,7 @@ SPDX-License-Identifier: Apache-2.0
</div>

<div v-else>
<div style="margin: 20px 20%">
<div style="margin-top: 20px" class="center-header">

<md-button class="md-icon-button green-icon-button" v-if="trusted" @click="displayTrustConsent">
<md-icon class="black-icon">verified</md-icon>
Expand Down Expand Up @@ -135,7 +135,7 @@ SPDX-License-Identifier: Apache-2.0
<script>
let govnDefaultLogo
try {
govnDefaultLogo = require("@/assets/img/govn.png")
} catch (e) {
Expand Down Expand Up @@ -189,6 +189,7 @@ SPDX-License-Identifier: Apache-2.0


<style lang="css" scoped>
.green-icon-button {
background-color: #00cc66 !important;
margin: 0px
Expand All @@ -211,4 +212,8 @@ SPDX-License-Identifier: Apache-2.0
font-family: monospace;
}
.center-header {
text-align: center !important;
}
</style>
2 changes: 1 addition & 1 deletion cmd/user-agent/src/pages/chapi/PresentationDefQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SPDX-License-Identifier: Apache-2.0
</div>


<md-card style="margin-top: 0px" v-for="requirement in requirements" :key="requirement.name"
<md-card v-for="requirement in requirements" :key="requirement.name"
:value="requirement">

<md-card-expand>
Expand Down
9 changes: 5 additions & 4 deletions cmd/user-agent/src/pages/chapi/wallet/get/didConn.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ export class DIDConn {

/*
TODO:
* current assumption - expecting only one governance VC in request, may be support for multiple
* correlate governance VC with requesting party so that consent for trust gets shown only once
* verify governance VC proof
* verify requesting party in governance framework to make sure this party of behaving properly
* current assumption - expecting only one governance VC in request, may be support for multiple.
* correlate governance VC with requesting party so that consent for trust gets shown only once.
* verify governance VC proof.
* verify requesting party in governance framework to make sure this party of behaving properly.
* request party to get challenged to produce a VP that the governance credential agency has accredited them.
*/
return govnVCs.length > 0 ? govnVCs[0] : undefined
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ export class WalletGetByQuery extends WalletGet {

/*
TODO:
* current assumption - expecting only one governance VC in request, may be support for multiple
* correlate governance VC with requesting party so that consent for trust gets shown only once
* verify governance VC proof
* verify requesting party in governance framework to make sure this party of behaving properly
* current assumption - expecting only one governance VC in request, may be support for multiple.
* correlate governance VC with requesting party so that consent for trust gets shown only once.
* verify governance VC proof.
* verify requesting party in governance framework to make sure this party of behaving properly.
* request party to get challenged to produce a VP that the governance credential agency has accredited them.
*/
this.govnVC = jp.query(credEvent, '$..credentialRequestOptions.web.VerifiablePresentation.query[?(@.type=="DIDConnect")].credentials[?(@.type[0]=="GovernanceCredential" || @.type[1]=="GovernanceCredential")]');

Expand Down

0 comments on commit fa28fda

Please sign in to comment.