@sphereon/oid4vci-client 0.10.3-next.8 → 0.10.4-unstable.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,4 +58,26 @@ describe('Issuance Initiation', () => {
|
|
|
58
58
|
expect(client.credential_offer.credential_issuer).toEqual('https://launchpad.vii.electron.mattrlabs.io');
|
|
59
59
|
expect(client.preAuthorizedCode).toEqual('UPZohaodPlLBnGsqB02n2tIupCIg8nKRRUEUHWA665X');
|
|
60
60
|
});
|
|
61
|
+
|
|
62
|
+
it('Should take an https url as input and return a Credential Offer', async () => {
|
|
63
|
+
const client = await CredentialOfferClient.fromURI(
|
|
64
|
+
'https://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Flaunchpad.vii.electron.mattrlabs.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22ldp_vc%22%2C%22types%22%3A%5B%22OpenBadgeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22UPZohaodPlLBnGsqB02n2tIupCIg8nKRRUEUHWA665X%22%7D%7D%7D',
|
|
65
|
+
);
|
|
66
|
+
expect(client.version).toEqual(OpenId4VCIVersion.VER_1_0_11);
|
|
67
|
+
expect(client.baseUrl).toEqual('https://');
|
|
68
|
+
expect(client.scheme).toEqual('https');
|
|
69
|
+
expect(client.credential_offer.credential_issuer).toEqual('https://launchpad.vii.electron.mattrlabs.io');
|
|
70
|
+
expect(client.preAuthorizedCode).toEqual('UPZohaodPlLBnGsqB02n2tIupCIg8nKRRUEUHWA665X');
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
it('Should take an https url as input and return a Credential Offer', async () => {
|
|
74
|
+
const client = await CredentialOfferClient.fromURI(
|
|
75
|
+
'http://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Flaunchpad.vii.electron.mattrlabs.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22ldp_vc%22%2C%22types%22%3A%5B%22OpenBadgeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22UPZohaodPlLBnGsqB02n2tIupCIg8nKRRUEUHWA665X%22%7D%7D%7D',
|
|
76
|
+
);
|
|
77
|
+
expect(client.version).toEqual(OpenId4VCIVersion.VER_1_0_11);
|
|
78
|
+
expect(client.baseUrl).toEqual('http://');
|
|
79
|
+
expect(client.scheme).toEqual('http');
|
|
80
|
+
expect(client.credential_offer.credential_issuer).toEqual('https://launchpad.vii.electron.mattrlabs.io');
|
|
81
|
+
expect(client.preAuthorizedCode).toEqual('UPZohaodPlLBnGsqB02n2tIupCIg8nKRRUEUHWA665X');
|
|
82
|
+
})
|
|
61
83
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-client",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4-unstable.2+968cc5f",
|
|
4
4
|
"description": "OpenID for Verifiable Credential Issuance (OpenID4VCI) client",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"build": "tsc"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sphereon/oid4vci-common": "0.10.
|
|
18
|
+
"@sphereon/oid4vci-common": "0.10.4-unstable.2+968cc5f",
|
|
19
19
|
"@sphereon/ssi-types": "^0.23.0",
|
|
20
20
|
"cross-fetch": "^3.1.8",
|
|
21
21
|
"debug": "^4.3.4"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"OIDC4VCI",
|
|
70
70
|
"OID4VCI"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "968cc5ff4f829f528cc6b0941f69470a97c206ec"
|
|
73
73
|
}
|