@sphereon/ssi-sdk.siopv2-oid4vp-common 0.34.1-feature.SSISDK.46.40 → 0.34.1-feature.SSISDK.47.42
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.
- package/dist/index.cjs +0 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +0 -14
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/auth-model.ts +2 -12
package/dist/index.cjs
CHANGED
|
@@ -29,26 +29,12 @@ __export(index_exports, {
|
|
|
29
29
|
SupportedVersion: () => import_did_auth_siop.SupportedVersion,
|
|
30
30
|
URI: () => import_did_auth_siop.URI,
|
|
31
31
|
VPTokenLocation: () => import_did_auth_siop.VPTokenLocation,
|
|
32
|
-
authorizationRequestStatuses: () => authorizationRequestStatuses,
|
|
33
|
-
authorizationResponseStatuses: () => authorizationResponseStatuses,
|
|
34
32
|
decodeUriAsJson: () => import_did_auth_siop.decodeUriAsJson,
|
|
35
33
|
encodeJsonAsURI: () => import_did_auth_siop.encodeJsonAsURI,
|
|
36
34
|
uriWithBase: () => uriWithBase
|
|
37
35
|
});
|
|
38
36
|
module.exports = __toCommonJS(index_exports);
|
|
39
37
|
|
|
40
|
-
// src/auth-model.ts
|
|
41
|
-
var authorizationRequestStatuses = [
|
|
42
|
-
"authorization_request_created",
|
|
43
|
-
"authorization_request_retrieved",
|
|
44
|
-
"error"
|
|
45
|
-
];
|
|
46
|
-
var authorizationResponseStatuses = [
|
|
47
|
-
"authorization_response_received",
|
|
48
|
-
"authorization_response_verified",
|
|
49
|
-
"error"
|
|
50
|
-
];
|
|
51
|
-
|
|
52
38
|
// src/utils.ts
|
|
53
39
|
function uriWithBase(path, opts) {
|
|
54
40
|
let baseUri = `${!!opts?.baseURI ? opts.baseURI : opts?.envVarName && process ? process.env[opts.envVarName] : process?.env?.BACKEND_BASE_URI}`;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":["export * from './auth-model'\nexport * from './utils'\n\n// We are exporting some common class from SIOP\n/**\n * @private\n */\nexport {\n decodeUriAsJson,\n encodeJsonAsURI,\n type AuthorizationResponsePayload,\n type AuthorizationRequestPayload,\n URI,\n type AuthorizationRequestState,\n type RequestObjectPayload,\n AuthorizationRequest,\n AuthorizationResponse,\n RP,\n OP,\n OPBuilder,\n SupportedVersion,\n type PresentationDefinitionWithLocation,\n type PresentationVerificationResult,\n type PresentationVerificationCallback,\n VPTokenLocation,\n} from '@sphereon/did-auth-siop'\n","export function uriWithBase(path: string, opts?: { baseURI?: string; envVarName?: string }) {\n let baseUri = `${!!opts?.baseURI ? opts.baseURI : opts?.envVarName && process ? process.env[opts.envVarName!] : process?.env?.BACKEND_BASE_URI}`\n if (!baseUri || baseUri === 'undefined') {\n throw Error('No base URI provided as param or environment variable')\n } else if (!baseUri.startsWith('http')) {\n throw Error(`Base URI needs to start with http(s). Received: ${baseUri}`)\n }\n baseUri = baseUri.endsWith('/') ? baseUri.substring(0, baseUri.length - 1) : baseUri\n return `${baseUri}${path.startsWith('/') ? path : '/' + path}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;ACAO,SAASA,YAAYC,MAAcC,MAAgD;AACxF,MAAIC,UAAU,GAAG,CAAC,CAACD,MAAME,UAAUF,KAAKE,UAAUF,MAAMG,cAAcC,UAAUA,QAAQC,IAAIL,KAAKG,UAAU,IAAKC,SAASC,KAAKC,gBAAAA;AAC9H,MAAI,CAACL,WAAWA,YAAY,aAAa;AACvC,UAAMM,MAAM,uDAAA;EACd,WAAW,CAACN,QAAQO,WAAW,MAAA,GAAS;AACtC,UAAMD,MAAM,mDAAmDN,OAAAA,EAAS;EAC1E;AACAA,YAAUA,QAAQQ,SAAS,GAAA,IAAOR,QAAQS,UAAU,GAAGT,QAAQU,SAAS,CAAA,IAAKV;AAC7E,SAAO,GAAGA,OAAAA,GAAUF,KAAKS,WAAW,GAAA,IAAOT,OAAO,MAAMA,IAAAA;AAC1D;AATgBD;;;ADOhB,2BAkBO;","names":["uriWithBase","path","opts","baseUri","baseURI","envVarName","process","env","BACKEND_BASE_URI","Error","startsWith","endsWith","substring","length"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -8,10 +8,8 @@ interface ClaimPayloadCommonOpts {
|
|
|
8
8
|
interface AuthorizationChallengeValidationResponse {
|
|
9
9
|
presentation_during_issuance_session: string;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
type
|
|
13
|
-
declare const authorizationResponseStatuses: readonly ["authorization_response_received", "authorization_response_verified", "error"];
|
|
14
|
-
type AuthorizationResponseStateStatus = (typeof authorizationResponseStatuses)[number];
|
|
11
|
+
type AuthorizationRequestStateStatus = "authorization_request_created" | "authorization_request_retrieved" | "error";
|
|
12
|
+
type AuthorizationResponseStateStatus = "authorization_response_received" | "authorization_response_verified" | "error";
|
|
15
13
|
interface GenerateAuthRequestURIResponse {
|
|
16
14
|
correlationId: string;
|
|
17
15
|
state: string;
|
|
@@ -34,4 +32,4 @@ declare function uriWithBase(path: string, opts?: {
|
|
|
34
32
|
envVarName?: string;
|
|
35
33
|
}): string;
|
|
36
34
|
|
|
37
|
-
export { type AuthStatusResponse, type AuthorizationChallengeValidationResponse, type AuthorizationRequestStateStatus, type AuthorizationResponseStateStatus, type ClaimPayloadCommonOpts, type GenerateAuthRequestURIResponse,
|
|
35
|
+
export { type AuthStatusResponse, type AuthorizationChallengeValidationResponse, type AuthorizationRequestStateStatus, type AuthorizationResponseStateStatus, type ClaimPayloadCommonOpts, type GenerateAuthRequestURIResponse, uriWithBase };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,8 @@ interface ClaimPayloadCommonOpts {
|
|
|
8
8
|
interface AuthorizationChallengeValidationResponse {
|
|
9
9
|
presentation_during_issuance_session: string;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
type
|
|
13
|
-
declare const authorizationResponseStatuses: readonly ["authorization_response_received", "authorization_response_verified", "error"];
|
|
14
|
-
type AuthorizationResponseStateStatus = (typeof authorizationResponseStatuses)[number];
|
|
11
|
+
type AuthorizationRequestStateStatus = "authorization_request_created" | "authorization_request_retrieved" | "error";
|
|
12
|
+
type AuthorizationResponseStateStatus = "authorization_response_received" | "authorization_response_verified" | "error";
|
|
15
13
|
interface GenerateAuthRequestURIResponse {
|
|
16
14
|
correlationId: string;
|
|
17
15
|
state: string;
|
|
@@ -34,4 +32,4 @@ declare function uriWithBase(path: string, opts?: {
|
|
|
34
32
|
envVarName?: string;
|
|
35
33
|
}): string;
|
|
36
34
|
|
|
37
|
-
export { type AuthStatusResponse, type AuthorizationChallengeValidationResponse, type AuthorizationRequestStateStatus, type AuthorizationResponseStateStatus, type ClaimPayloadCommonOpts, type GenerateAuthRequestURIResponse,
|
|
35
|
+
export { type AuthStatusResponse, type AuthorizationChallengeValidationResponse, type AuthorizationRequestStateStatus, type AuthorizationResponseStateStatus, type ClaimPayloadCommonOpts, type GenerateAuthRequestURIResponse, uriWithBase };
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// src/auth-model.ts
|
|
5
|
-
var authorizationRequestStatuses = [
|
|
6
|
-
"authorization_request_created",
|
|
7
|
-
"authorization_request_retrieved",
|
|
8
|
-
"error"
|
|
9
|
-
];
|
|
10
|
-
var authorizationResponseStatuses = [
|
|
11
|
-
"authorization_response_received",
|
|
12
|
-
"authorization_response_verified",
|
|
13
|
-
"error"
|
|
14
|
-
];
|
|
15
|
-
|
|
16
4
|
// src/utils.ts
|
|
17
5
|
function uriWithBase(path, opts) {
|
|
18
6
|
let baseUri = `${!!opts?.baseURI ? opts.baseURI : opts?.envVarName && process ? process.env[opts.envVarName] : process?.env?.BACKEND_BASE_URI}`;
|
|
@@ -37,8 +25,6 @@ export {
|
|
|
37
25
|
SupportedVersion,
|
|
38
26
|
URI,
|
|
39
27
|
VPTokenLocation,
|
|
40
|
-
authorizationRequestStatuses,
|
|
41
|
-
authorizationResponseStatuses,
|
|
42
28
|
decodeUriAsJson,
|
|
43
29
|
encodeJsonAsURI,
|
|
44
30
|
uriWithBase
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":["export function uriWithBase(path: string, opts?: { baseURI?: string; envVarName?: string }) {\n let baseUri = `${!!opts?.baseURI ? opts.baseURI : opts?.envVarName && process ? process.env[opts.envVarName!] : process?.env?.BACKEND_BASE_URI}`\n if (!baseUri || baseUri === 'undefined') {\n throw Error('No base URI provided as param or environment variable')\n } else if (!baseUri.startsWith('http')) {\n throw Error(`Base URI needs to start with http(s). Received: ${baseUri}`)\n }\n baseUri = baseUri.endsWith('/') ? baseUri.substring(0, baseUri.length - 1) : baseUri\n return `${baseUri}${path.startsWith('/') ? path : '/' + path}`\n}\n","export * from './auth-model'\nexport * from './utils'\n\n// We are exporting some common class from SIOP\n/**\n * @private\n */\nexport {\n decodeUriAsJson,\n encodeJsonAsURI,\n type AuthorizationResponsePayload,\n type AuthorizationRequestPayload,\n URI,\n type AuthorizationRequestState,\n type RequestObjectPayload,\n AuthorizationRequest,\n AuthorizationResponse,\n RP,\n OP,\n OPBuilder,\n SupportedVersion,\n type PresentationDefinitionWithLocation,\n type PresentationVerificationResult,\n type PresentationVerificationCallback,\n VPTokenLocation,\n} from '@sphereon/did-auth-siop'\n"],"mappings":";;;;AAAO,SAASA,YAAYC,MAAcC,MAAgD;AACxF,MAAIC,UAAU,GAAG,CAAC,CAACD,MAAME,UAAUF,KAAKE,UAAUF,MAAMG,cAAcC,UAAUA,QAAQC,IAAIL,KAAKG,UAAU,IAAKC,SAASC,KAAKC,gBAAAA;AAC9H,MAAI,CAACL,WAAWA,YAAY,aAAa;AACvC,UAAMM,MAAM,uDAAA;EACd,WAAW,CAACN,QAAQO,WAAW,MAAA,GAAS;AACtC,UAAMD,MAAM,mDAAmDN,OAAAA,EAAS;EAC1E;AACAA,YAAUA,QAAQQ,SAAS,GAAA,IAAOR,QAAQS,UAAU,GAAGT,QAAQU,SAAS,CAAA,IAAKV;AAC7E,SAAO,GAAGA,OAAAA,GAAUF,KAAKS,WAAW,GAAA,IAAOT,OAAO,MAAMA,IAAAA;AAC1D;AATgBD;;;ACOhB,SACEc,iBACAC,iBAGAC,KAGAC,sBACAC,uBACAC,IACAC,IACAC,WACAC,kBAIAC,uBACK;","names":["uriWithBase","path","opts","baseUri","baseURI","envVarName","process","env","BACKEND_BASE_URI","Error","startsWith","endsWith","substring","length","decodeUriAsJson","encodeJsonAsURI","URI","AuthorizationRequest","AuthorizationResponse","RP","OP","OPBuilder","SupportedVersion","VPTokenLocation"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.siopv2-oid4vp-common",
|
|
3
|
-
"version": "0.34.1-feature.SSISDK.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.47.42+117ad37d",
|
|
4
4
|
"description": "Common SIOPv2 and OID4VP types between modules",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@sphereon/did-auth-siop": "0.19.1-next.2",
|
|
29
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.
|
|
30
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.
|
|
29
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.47.42+117ad37d",
|
|
30
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.47.42+117ad37d",
|
|
31
31
|
"uint8arrays": "^3.1.1"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"README.md",
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "117ad37d1397fe6c2f99f499761323dd8158699e"
|
|
47
47
|
}
|
package/src/auth-model.ts
CHANGED
|
@@ -10,19 +10,9 @@ export interface AuthorizationChallengeValidationResponse {
|
|
|
10
10
|
presentation_during_issuance_session: string
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export
|
|
14
|
-
"authorization_request_created",
|
|
15
|
-
"authorization_request_retrieved",
|
|
16
|
-
"error",
|
|
17
|
-
] as const;
|
|
18
|
-
export type AuthorizationRequestStateStatus = (typeof authorizationRequestStatuses)[number];
|
|
13
|
+
export type AuthorizationRequestStateStatus = "authorization_request_created" | "authorization_request_retrieved" | "error"//(typeof authorizationRequestStatuses)[number];
|
|
19
14
|
|
|
20
|
-
export
|
|
21
|
-
"authorization_response_received",
|
|
22
|
-
"authorization_response_verified",
|
|
23
|
-
"error",
|
|
24
|
-
] as const;
|
|
25
|
-
export type AuthorizationResponseStateStatus = (typeof authorizationResponseStatuses)[number];
|
|
15
|
+
export type AuthorizationResponseStateStatus = "authorization_response_received" | "authorization_response_verified" | "error"//(typeof authorizationResponseStatuses)[number];
|
|
26
16
|
|
|
27
17
|
export interface GenerateAuthRequestURIResponse {
|
|
28
18
|
correlationId: string
|