Skip to content

Commit

Permalink
test: fixed JWT issuance test and updated the namespace of the identu…
Browse files Browse the repository at this point in the history
…s-cloud-agent-client-ts

Signed-off-by: Yurii Shynbuiev <[email protected]>
  • Loading branch information
yshyn-iohk committed Dec 3, 2024
1 parent 32253cd commit b7e75ad
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,7 @@ Feature: Issue JWT credential
| secp256k1 | assert-1 |
| ed25519 | assert-1 |

Scenario: Issuing jwt credential with published PRISM DID
Given Issuer and Holder have an existing connection
And Issuer has a published DID for 'JWT'
And Issuer has published 'STUDENT_SCHEMA' schema
And Holder has an unpublished DID for 'JWT'
When Issuer offers a jwt credential to Holder with 'short' form DID
And Holder receives the credential offer
And Holder accepts jwt credential offer using 'auth-1' key id
And Issuer issues the credential
Then Holder receives the issued credential

Scenario: Issuing jwt credential with a schema
Scenario: Issuing jwt credential with published PRISM DID and student schema
Given Issuer and Holder have an existing connection
And Issuer has a published DID for 'JWT'
And Issuer has published 'STUDENT_SCHEMA' schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Clone the generated repository on your local machine, move to the project root folder and install the dependencies defined in [`package.json`](./package.json)

*NOTE*: The Project has a dependency on `input-output-hk/prism-typescript-client` which is a private repository.
*NOTE*: The Project has a dependency on `hyperledger/identus-cloud-agent-client-ts` which is the GitHub packages repository.
To install this dependency, you need to have an environment variable `GITHUB_TOKEN` with the scope `read:packages` set, you can install the dependency by running the following command:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"webpack": "webpack"
},
"dependencies": {
"@hyperledger/identus-cloud-agent-client-ts": "^1.39.1-19ab426",
"@hyperledger/identus-cloud-agent-client-ts": "^1.40.0",
"uuid": "^9.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Connection, ConnectionInvitation, IssueCredentialRecord } from "@input-output-hk/prism-typescript-client";
import { Connection, ConnectionInvitation, IssueCredentialRecord } from "@hyperledger/identus-cloud-agent-client-ts";
import { Actor } from "./Actor";
import { HOLDER_AGENT_API_KEY, HOLDER_AGENT_URL } from "../common/Config";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Connection, CredentialSchemaResponse, IssueCredentialRecord } from "@input-output-hk/prism-typescript-client";
import { Connection, CredentialSchemaResponse, IssueCredentialRecord } from "@hyperledger/identus-cloud-agent-client-ts";
import { Actor } from "./Actor";
import { ISSUER_AGENT_API_KEY, ISSUER_AGENT_URL } from "../common/Config";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Connection, PresentationStatus } from "@input-output-hk/prism-typescript-client";
import { Connection, PresentationStatus } from "@hyperledger/identus-cloud-agent-client-ts";
import { Actor } from "./Actor";
import { VERIFIER_AGENT_API_KEY, VERIFIER_AGENT_URL } from "../common/Config";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*global __ENV*/

import { Connection, ConnectionInvitation, ConnectionStateEnum } from "@input-output-hk/prism-typescript-client";
import { Connection, ConnectionInvitation, ConnectionStateEnum } from "@hyperledger/identus-cloud-agent-client-ts";
import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config";
import { HttpService, statusChangeTimeouts } from "./HttpService";
import { sleep, fail } from "k6";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fail, sleep } from "k6";
import { HttpService, statusChangeTimeouts } from "./HttpService";
import { ISSUER_AGENT_URL, WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config";
import { IssueCredentialRecord, Connection, CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client";
import { IssueCredentialRecord, Connection, CredentialSchemaResponse } from "@hyperledger/identus-cloud-agent-client-ts";
import { crypto } from "k6/experimental/webcrypto";

/**
Expand All @@ -21,12 +21,12 @@ export class CredentialsService extends HttpService {
"claims": {
"emailAddress": "${crypto.randomUUID()}[email protected]",
"familyName": "Test",
"schemaId": "${ISSUER_AGENT_URL.replace("localhost", "host.docker.internal")}/schema-registry/schemas/${schema.guid}/schema",
"dateOfIssuance": "${new Date()}",
"drivingLicenseID": "Test",
"drivingClass": 1
},
"issuingDID": "${issuingDid}",
"schemaId": "${ISSUER_AGENT_URL.replace("localhost", "host.docker.internal")}/schema-registry/schemas/${schema.guid}",
"connectionId": "${connection.connectionId}",
"automaticIssuance": false
}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
DIDDocument,
DidOperationSubmission,
ManagedDID
} from "@input-output-hk/prism-typescript-client";
} from "@hyperledger/identus-cloud-agent-client-ts";
import {fail, sleep} from "k6";


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpService, statusChangeTimeouts } from "./HttpService";
import {fail, sleep} from "k6";
import {Connection, PresentationStatus} from "@input-output-hk/prism-typescript-client";
import {Connection, PresentationStatus} from "@hyperledger/identus-cloud-agent-client-ts";
import { WAITING_LOOP_MAX_ITERATIONS, WAITING_LOOP_PAUSE_INTERVAL } from "./Config";
import vu from "k6/execution";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Options } from "k6/options";
import { Issuer } from "../../actors";
import { defaultOptions } from "../../scenarios/default";
import merge from "ts-deepmerge";
import { CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client";
import { CredentialSchemaResponse } from "@hyperledger/identus-cloud-agent-client-ts";
import { describe } from "../../k6chaijs.js";

export const localOptions: Options = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Options } from 'k6/options';
import { Issuer, Holder } from '../../actors';
import { Connection, CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client';
import { Connection, CredentialSchemaResponse } from '@hyperledger/identus-cloud-agent-client-ts';
import { defaultOptions } from "../../scenarios/default";
import merge from "ts-deepmerge";
import { describe } from "../../k6chaijs.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Options } from "k6/options";
import { issuer, holder } from "../common";
import { CredentialSchemaResponse } from "@input-output-hk/prism-typescript-client";
import { CredentialSchemaResponse } from "@hyperledger/identus-cloud-agent-client-ts";
import { defaultOptions } from "../../scenarios/default";
import merge from "ts-deepmerge";
import { describe } from "../../k6chaijs.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Options } from 'k6/options'
import { Issuer, Holder, Verifier } from '../../actors'
import { CredentialSchemaResponse } from '@input-output-hk/prism-typescript-client'
import { CredentialSchemaResponse } from '@hyperledger/identus-cloud-agent-client-ts'
import { defaultOptions } from '../../scenarios/default'
import merge from 'ts-deepmerge'
import { describe } from '../../k6chaijs.js'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

"@hyperledger/identus-cloud-agent-client-ts@^1.39.1-19ab426":
"@hyperledger/identus-cloud-agent-client-ts@^1.40.0":
version "1.40.0"
resolved "https://npm.pkg.github.com/download/@hyperledger/identus-cloud-agent-client-ts/1.40.0/ce8120a0483b02cda6aa348dd7e2f175c7a5b846#ce8120a0483b02cda6aa348dd7e2f175c7a5b846"
integrity sha512-uvxDYP8lJM7Dl7HMSX44fodVOxUaqsXy4WfNL2pdVCNBOksGFyAmxcAOlU8VNoCTCtKowyoPBnCK6zl9jyhgIw==
Expand Down

0 comments on commit b7e75ad

Please sign in to comment.