Skip to content
Snippets Groups Projects
Commit 7668c363 authored by Lyuben Penkovski's avatar Lyuben Penkovski
Browse files

Updates required by changes in latest golib v1.3.0

The public API of the OCM has changed a bit and thus the OCM client in the golib
has also changed to reflect that. This commit updates the code to use the changed
variable names in the library.
parent 2d414bae
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ lint:
before_script: []
unit tests:
image: golang:1.20.3
image: golang:1.20.4
extends: .gotest
stage: test
tags:
......@@ -39,7 +39,7 @@ unit tests:
coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/'
govulncheck:
image: golang:1.20.3
image: golang:1.20.4
stage: test
tags:
- amd64-docker
......
FROM golang:1.20.3-alpine3.17 as builder
FROM golang:1.20.4-alpine3.17 as builder
RUN apk add git
......
FROM golang:1.20.3
FROM golang:1.20.4
RUN go install github.com/ysmood/kit/cmd/guard@v0.25.11
......
......@@ -71,7 +71,7 @@ func (of *OcmFuncs) GetLoginProofInvitation() (*rego.Function, rego.Builtin2) {
var val ast.Value
val, err = ast.InterfaceToValue(result{
Link: res.Data.PresentationMessage,
RequestID: res.Data.PresentationID,
RequestID: res.Data.ProofRecordID,
})
if err != nil {
return nil, err
......@@ -109,7 +109,7 @@ func (of *OcmFuncs) SendPresentationRequest() (*rego.Function, rego.Builtin1) {
var val ast.Value
val, err = ast.InterfaceToValue(result{
Link: res.Data.PresentationMessage,
RequestID: res.Data.PresentationID,
RequestID: res.Data.ProofRecordID,
})
if err != nil {
return nil, err
......@@ -142,8 +142,8 @@ func (of *OcmFuncs) GetLoginProofResult() (*rego.Function, rego.Builtin1) {
}
claims := map[string]interface{}{}
for _, cred := range res.Data.Data {
for cName, cValue := range cred.Claims {
for _, pres := range res.Data.Presentations {
for cName, cValue := range pres.Claims {
claims[cName] = cValue
}
}
......
......@@ -20,7 +20,7 @@ func TestGetLoginProofInvitationSuccess(t *testing.T) {
"statusCode": 201,
"message": "Presentation request send successfully",
"data": {
"presentationId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c",
"proofRecordId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c",
"presentationMessage": "https://ocm:443/ocm/didcomm/?d_m=eyJAdHlwZSI"
}
}`
......@@ -112,7 +112,7 @@ func TestSendPresentationRequestSuccess(t *testing.T) {
"statusCode": 201,
"message": "Presentation request send successfully",
"data": {
"presentationId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c",
"proofRecordId": "2cf01406-b15f-4960-a6a7-7bc62cd37a3c",
"presentationMessage": "https://ocm:443/ocm/didcomm/?d_m=eyJAdHlwZSI"
}
}`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment