@sphereon/jarm 0.16.1-unstable.105
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/LICENSE +201 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/jarm-auth-response/c-jarm-auth-response.d.ts +55 -0
- package/dist/jarm-auth-response/c-jarm-auth-response.d.ts.map +1 -0
- package/dist/jarm-auth-response/c-jarm-auth-response.js +45 -0
- package/dist/jarm-auth-response/c-jarm-auth-response.js.map +1 -0
- package/dist/jarm-auth-response/index.d.ts +5 -0
- package/dist/jarm-auth-response/index.d.ts.map +1 -0
- package/dist/jarm-auth-response/index.js +21 -0
- package/dist/jarm-auth-response/index.js.map +1 -0
- package/dist/jarm-auth-response/jarm-auth-response.d.ts +48 -0
- package/dist/jarm-auth-response/jarm-auth-response.d.ts.map +1 -0
- package/dist/jarm-auth-response/jarm-auth-response.js +113 -0
- package/dist/jarm-auth-response/jarm-auth-response.js.map +1 -0
- package/dist/jarm-auth-response/v-jarm-auth-response-params.d.ts +31 -0
- package/dist/jarm-auth-response/v-jarm-auth-response-params.d.ts.map +1 -0
- package/dist/jarm-auth-response/v-jarm-auth-response-params.js +67 -0
- package/dist/jarm-auth-response/v-jarm-auth-response-params.js.map +1 -0
- package/dist/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.d.ts +18 -0
- package/dist/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.d.ts.map +1 -0
- package/dist/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.js +38 -0
- package/dist/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.js.map +1 -0
- package/dist/jarm-auth-response-send/index.d.ts +2 -0
- package/dist/jarm-auth-response-send/index.d.ts.map +1 -0
- package/dist/jarm-auth-response-send/index.js +18 -0
- package/dist/jarm-auth-response-send/index.js.map +1 -0
- package/dist/jarm-auth-response-send/jarm-auth-response-send.d.ts +16 -0
- package/dist/jarm-auth-response-send/jarm-auth-response-send.d.ts.map +1 -0
- package/dist/jarm-auth-response-send/jarm-auth-response-send.js +67 -0
- package/dist/jarm-auth-response-send/jarm-auth-response-send.js.map +1 -0
- package/dist/metadata/index.d.ts +4 -0
- package/dist/metadata/index.d.ts.map +1 -0
- package/dist/metadata/index.js +20 -0
- package/dist/metadata/index.js.map +1 -0
- package/dist/metadata/jarm-validate-metadata.d.ts +70 -0
- package/dist/metadata/jarm-validate-metadata.d.ts.map +1 -0
- package/dist/metadata/jarm-validate-metadata.js +98 -0
- package/dist/metadata/jarm-validate-metadata.js.map +1 -0
- package/dist/metadata/v-jarm-client-metadata.d.ts +34 -0
- package/dist/metadata/v-jarm-client-metadata.d.ts.map +1 -0
- package/dist/metadata/v-jarm-client-metadata.js +44 -0
- package/dist/metadata/v-jarm-client-metadata.js.map +1 -0
- package/dist/metadata/v-jarm-server-metadata.d.ts +11 -0
- package/dist/metadata/v-jarm-server-metadata.d.ts.map +1 -0
- package/dist/metadata/v-jarm-server-metadata.js +36 -0
- package/dist/metadata/v-jarm-server-metadata.js.map +1 -0
- package/dist/utils.d.ts +17 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +34 -0
- package/dist/utils.js.map +1 -0
- package/dist/v-response-mode-registry.d.ts +30 -0
- package/dist/v-response-mode-registry.d.ts.map +1 -0
- package/dist/v-response-mode-registry.js +90 -0
- package/dist/v-response-mode-registry.js.map +1 -0
- package/dist/v-response-type-registry.d.ts +9 -0
- package/dist/v-response-type-registry.d.ts.map +1 -0
- package/dist/v-response-type-registry.js +38 -0
- package/dist/v-response-type-registry.js.map +1 -0
- package/lib/index.ts +3 -0
- package/lib/jarm-auth-response/c-jarm-auth-response.ts +41 -0
- package/lib/jarm-auth-response/index.ts +4 -0
- package/lib/jarm-auth-response/jarm-auth-response.ts +106 -0
- package/lib/jarm-auth-response/v-jarm-auth-response-params.ts +62 -0
- package/lib/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.ts +26 -0
- package/lib/jarm-auth-response-send/index.ts +1 -0
- package/lib/jarm-auth-response-send/jarm-auth-response-send.ts +76 -0
- package/lib/metadata/index.ts +3 -0
- package/lib/metadata/jarm-validate-metadata.ts +80 -0
- package/lib/metadata/v-jarm-client-metadata.ts +42 -0
- package/lib/metadata/v-jarm-server-metadata.ts +29 -0
- package/lib/utils.ts +42 -0
- package/lib/v-response-mode-registry.ts +81 -0
- package/lib/v-response-type-registry.ts +23 -0
- package/package.json +44 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.validateJarmAuthResponseParams = exports.vJarmAuthResponseParams = exports.vJarmAuthResponseErrorParams = void 0;
|
|
27
|
+
const oid4vc_common_1 = require("@sphereon/oid4vc-common");
|
|
28
|
+
const v = __importStar(require("valibot"));
|
|
29
|
+
exports.vJarmAuthResponseErrorParams = v.looseObject({
|
|
30
|
+
error: v.string(),
|
|
31
|
+
state: v.optional(v.string()),
|
|
32
|
+
error_description: v.pipe(v.optional(v.string()), v.description('Text providing additional information, used to assist the client developer in understanding the error that occurred.')),
|
|
33
|
+
error_uri: v.pipe(v.optional(v.pipe(v.string(), v.url())), v.description('A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error')),
|
|
34
|
+
});
|
|
35
|
+
exports.vJarmAuthResponseParams = v.looseObject({
|
|
36
|
+
state: v.optional(v.string()),
|
|
37
|
+
/**
|
|
38
|
+
* The issuer URL of the authorization server that created the response
|
|
39
|
+
*/
|
|
40
|
+
iss: v.string(),
|
|
41
|
+
/**
|
|
42
|
+
* The client_id of the client the response is intended for
|
|
43
|
+
*/
|
|
44
|
+
exp: v.number(),
|
|
45
|
+
/**
|
|
46
|
+
* Expiration of the JWT
|
|
47
|
+
*/
|
|
48
|
+
aud: v.string(),
|
|
49
|
+
});
|
|
50
|
+
const validateJarmAuthResponseParams = (input) => {
|
|
51
|
+
const { authRequestParams, authResponseParams } = input;
|
|
52
|
+
// 2. The client obtains the state parameter from the JWT and checks its binding to the user agent. If the check fails, the client MUST abort processing and refuse the response.
|
|
53
|
+
if (authRequestParams.state !== authResponseParams.state) {
|
|
54
|
+
throw new Error(`State missmatch in jarm-auth-response. Expected '${authRequestParams.state}' received '${authRequestParams.state}'.`);
|
|
55
|
+
}
|
|
56
|
+
// 4. The client obtains the aud element from the JWT and checks whether it matches the client id the client used to identify itself in the corresponding authorization request. If the check fails, the client MUST abort processing and refuse the response.
|
|
57
|
+
if (authRequestParams.client_id !== authResponseParams.client_id) {
|
|
58
|
+
throw new Error(`Invalid audience in jarm-auth-response. Expected '${authRequestParams.client_id}' received '${authResponseParams.aud}'.`);
|
|
59
|
+
}
|
|
60
|
+
// 5. The client checks the JWT's exp element to determine if the JWT is still valid. If the check fails, the client MUST abort processing and refuse the response.
|
|
61
|
+
// 120 seconds clock skew
|
|
62
|
+
if ((0, oid4vc_common_1.checkExp)({ exp: authResponseParams.exp })) {
|
|
63
|
+
throw new Error(`The '${authRequestParams.state}' and the jarm-auth-response.`);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.validateJarmAuthResponseParams = validateJarmAuthResponseParams;
|
|
67
|
+
//# sourceMappingURL=v-jarm-auth-response-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-auth-response-params.js","sourceRoot":"","sources":["../../lib/jarm-auth-response/v-jarm-auth-response-params.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAAmD;AACnD,2CAA6B;AAEhB,QAAA,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAE7B,iBAAiB,EAAE,CAAC,CAAC,IAAI,CACvB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EACtB,CAAC,CAAC,WAAW,CAAC,sHAAsH,CAAC,CACtI;IAED,SAAS,EAAE,CAAC,CAAC,IAAI,CACf,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EACvC,CAAC,CAAC,WAAW,CACX,gKAAgK,CACjK,CACF;CACF,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAE7B;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IAEf;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IAEf;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAII,MAAM,8BAA8B,GAAG,CAAC,KAG9C,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACxD,iLAAiL;IACjL,IAAI,iBAAiB,CAAC,KAAK,KAAK,kBAAkB,CAAC,KAAK,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,oDAAoD,iBAAiB,CAAC,KAAK,eAAe,iBAAiB,CAAC,KAAK,IAAI,CAAC,CAAC;IACzI,CAAC;IAED,8PAA8P;IAC9P,IAAI,iBAAiB,CAAC,SAAS,KAAK,kBAAkB,CAAC,SAAS,EAAE,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,qDAAqD,iBAAiB,CAAC,SAAS,eAAe,kBAAkB,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7I,CAAC;IAED,mKAAmK;IACnK,yBAAyB;IACzB,IAAI,IAAA,wBAAQ,EAAC,EAAE,GAAG,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,QAAQ,iBAAiB,CAAC,KAAK,+BAA+B,CAAC,CAAC;IAClF,CAAC;AACH,CAAC,CAAC;AApBW,QAAA,8BAA8B,kCAoBzC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const vJarmDirectPostJwtParams: v.LooseObjectSchema<{
|
|
3
|
+
readonly vp_token: v.StringSchema<undefined>;
|
|
4
|
+
readonly presentation_submission: v.UnknownSchema;
|
|
5
|
+
readonly nonce: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
6
|
+
readonly iss: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
7
|
+
readonly exp: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
8
|
+
readonly aud: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
9
|
+
readonly state: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
10
|
+
}, undefined>;
|
|
11
|
+
export type JarmDirectPostJwtResponseParams = v.InferInput<typeof vJarmDirectPostJwtParams>;
|
|
12
|
+
export declare const jarmAuthResponseDirectPostValidateParams: (input: {
|
|
13
|
+
authRequestParams: {
|
|
14
|
+
state?: string;
|
|
15
|
+
};
|
|
16
|
+
authResponseParams: JarmDirectPostJwtResponseParams;
|
|
17
|
+
}) => void;
|
|
18
|
+
//# sourceMappingURL=v-jarm-direct-post-jwt-auth-response-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-direct-post-jwt-auth-response-params.d.ts","sourceRoot":"","sources":["../../lib/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,wBAAwB;;;;;;;;aAOnC,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE5F,eAAO,MAAM,wCAAwC,UAAW;IAC9D,iBAAiB,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,kBAAkB,EAAE,+BAA+B,CAAC;CACrD,SAOA,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.jarmAuthResponseDirectPostValidateParams = exports.vJarmDirectPostJwtParams = void 0;
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
28
|
+
const v_jarm_auth_response_params_js_1 = require("./v-jarm-auth-response-params.js");
|
|
29
|
+
exports.vJarmDirectPostJwtParams = v.looseObject(Object.assign(Object.assign(Object.assign({}, v.omit(v_jarm_auth_response_params_js_1.vJarmAuthResponseParams, ['iss', 'aud', 'exp']).entries), v.partial(v.pick(v_jarm_auth_response_params_js_1.vJarmAuthResponseParams, ['iss', 'aud', 'exp'])).entries), { vp_token: v.string(), presentation_submission: v.unknown(), nonce: v.optional(v.string()) }));
|
|
30
|
+
const jarmAuthResponseDirectPostValidateParams = (input) => {
|
|
31
|
+
const { authRequestParams, authResponseParams } = input;
|
|
32
|
+
// 2. The client obtains the state parameter from the JWT and checks its binding to the user agent. If the check fails, the client MUST abort processing and refuse the response.
|
|
33
|
+
if (authRequestParams.state !== authResponseParams.state) {
|
|
34
|
+
throw new Error(`State missmatch between auth request '${authRequestParams.state}' and the jarm-auth-response.`);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.jarmAuthResponseDirectPostValidateParams = jarmAuthResponseDirectPostValidateParams;
|
|
38
|
+
//# sourceMappingURL=v-jarm-direct-post-jwt-auth-response-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-direct-post-jwt-auth-response-params.js","sourceRoot":"","sources":["../../lib/jarm-auth-response/v-jarm-direct-post-jwt-auth-response-params.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,qFAA2E;AAE9D,QAAA,wBAAwB,GAAG,CAAC,CAAC,WAAW,+CAChD,CAAC,CAAC,IAAI,CAAC,wDAAuB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,GAC9D,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,wDAAuB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,KAE5E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EACpB,uBAAuB,EAAE,CAAC,CAAC,OAAO,EAAE,EACpC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAC7B,CAAC;AAII,MAAM,wCAAwC,GAAG,CAAC,KAGxD,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IAExD,iLAAiL;IACjL,IAAI,iBAAiB,CAAC,KAAK,KAAK,kBAAkB,CAAC,KAAK,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,yCAAyC,iBAAiB,CAAC,KAAK,+BAA+B,CAAC,CAAC;IACnH,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,wCAAwC,4CAUnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/jarm-auth-response-send/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./jarm-auth-response-send.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/jarm-auth-response-send/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { JarmResponseMode, Openid4vpJarmResponseMode } from '../v-response-mode-registry.js';
|
|
2
|
+
import type { ResponseTypeOut } from '../v-response-type-registry.js';
|
|
3
|
+
interface JarmAuthResponseSendInput {
|
|
4
|
+
authRequestParams: {
|
|
5
|
+
response_mode?: JarmResponseMode | Openid4vpJarmResponseMode;
|
|
6
|
+
response_type: ResponseTypeOut;
|
|
7
|
+
} & ({
|
|
8
|
+
response_uri: string;
|
|
9
|
+
} | {
|
|
10
|
+
redirect_uri: string;
|
|
11
|
+
});
|
|
12
|
+
authResponse: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const jarmAuthResponseSend: (input: JarmAuthResponseSendInput) => Promise<Response>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=jarm-auth-response-send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jarm-auth-response-send.d.ts","sourceRoot":"","sources":["../../lib/jarm-auth-response-send/jarm-auth-response-send.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAElG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,UAAU,yBAAyB;IACjC,iBAAiB,EAAE;QACjB,aAAa,CAAC,EAAE,gBAAgB,GAAG,yBAAyB,CAAC;QAC7D,aAAa,EAAE,eAAe,CAAC;KAChC,GAAG,CACA;QACE,YAAY,EAAE,MAAM,CAAC;KACtB,GACD;QACE,YAAY,EAAE,MAAM,CAAC;KACtB,CACJ,CAAC;IAEF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,oBAAoB,UAAiB,yBAAyB,KAAG,QAAQ,QAAQ,CAyB7F,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.jarmAuthResponseSend = void 0;
|
|
13
|
+
const utils_js_1 = require("../utils.js");
|
|
14
|
+
const v_response_mode_registry_js_1 = require("../v-response-mode-registry.js");
|
|
15
|
+
const jarmAuthResponseSend = (input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const { authRequestParams, authResponse } = input;
|
|
17
|
+
const responseEndpoint = 'response_uri' in authRequestParams ? new URL(authRequestParams.response_uri) : new URL(authRequestParams.redirect_uri);
|
|
18
|
+
const responseMode = authRequestParams.response_mode && authRequestParams.response_mode !== 'jwt'
|
|
19
|
+
? authRequestParams.response_mode
|
|
20
|
+
: (0, v_response_mode_registry_js_1.getJarmDefaultResponseMode)(authRequestParams);
|
|
21
|
+
(0, v_response_mode_registry_js_1.validateResponseMode)({
|
|
22
|
+
response_type: authRequestParams.response_type,
|
|
23
|
+
response_mode: responseMode,
|
|
24
|
+
});
|
|
25
|
+
switch (responseMode) {
|
|
26
|
+
case 'direct_post.jwt':
|
|
27
|
+
return handleDirectPostJwt(responseEndpoint, authResponse);
|
|
28
|
+
case 'query.jwt':
|
|
29
|
+
return handleQueryJwt(responseEndpoint, authResponse);
|
|
30
|
+
case 'fragment.jwt':
|
|
31
|
+
return handleFragmentJwt(responseEndpoint, authResponse);
|
|
32
|
+
case 'form_post.jwt':
|
|
33
|
+
throw new Error('Not implemented');
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
exports.jarmAuthResponseSend = jarmAuthResponseSend;
|
|
37
|
+
function handleDirectPostJwt(responseEndpoint, responseJwt) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const response = yield fetch(responseEndpoint, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
42
|
+
body: `response=${responseJwt}`,
|
|
43
|
+
});
|
|
44
|
+
return response;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function handleQueryJwt(responseEndpoint, responseJwt) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const responseUrl = (0, utils_js_1.appendQueryParams)({
|
|
50
|
+
url: responseEndpoint,
|
|
51
|
+
params: { response: responseJwt },
|
|
52
|
+
});
|
|
53
|
+
const response = yield fetch(responseUrl, { method: 'POST' });
|
|
54
|
+
return response;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function handleFragmentJwt(responseEndpoint, responseJwt) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const responseUrl = (0, utils_js_1.appendFragmentParams)({
|
|
60
|
+
url: responseEndpoint,
|
|
61
|
+
fragments: { response: responseJwt },
|
|
62
|
+
});
|
|
63
|
+
const response = yield fetch(responseUrl, { method: 'POST' });
|
|
64
|
+
return response;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=jarm-auth-response-send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jarm-auth-response-send.js","sourceRoot":"","sources":["../../lib/jarm-auth-response-send/jarm-auth-response-send.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAsE;AAEtE,gFAAkG;AAmB3F,MAAM,oBAAoB,GAAG,CAAO,KAAgC,EAAqB,EAAE;IAChG,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAElD,MAAM,gBAAgB,GAAG,cAAc,IAAI,iBAAiB,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEjJ,MAAM,YAAY,GAChB,iBAAiB,CAAC,aAAa,IAAI,iBAAiB,CAAC,aAAa,KAAK,KAAK;QAC1E,CAAC,CAAC,iBAAiB,CAAC,aAAa;QACjC,CAAC,CAAC,IAAA,wDAA0B,EAAC,iBAAiB,CAAC,CAAC;IAEpD,IAAA,kDAAoB,EAAC;QACnB,aAAa,EAAE,iBAAiB,CAAC,aAAa;QAC9C,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;IAEH,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,iBAAiB;YACpB,OAAO,mBAAmB,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QAC7D,KAAK,WAAW;YACd,OAAO,cAAc,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QACxD,KAAK,cAAc;YACjB,OAAO,iBAAiB,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;QAC3D,KAAK,eAAe;YAClB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;AACH,CAAC,CAAA,CAAC;AAzBW,QAAA,oBAAoB,wBAyB/B;AAEF,SAAe,mBAAmB,CAAC,gBAAqB,EAAE,WAAmB;;QAC3E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YAC7C,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,IAAI,EAAE,YAAY,WAAW,EAAE;SAChC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAED,SAAe,cAAc,CAAC,gBAAqB,EAAE,WAAmB;;QACtE,MAAM,WAAW,GAAG,IAAA,4BAAiB,EAAC;YACpC,GAAG,EAAE,gBAAgB;YACrB,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;SAClC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9D,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAED,SAAe,iBAAiB,CAAC,gBAAqB,EAAE,WAAmB;;QACzE,MAAM,WAAW,GAAG,IAAA,+BAAoB,EAAC;YACvC,GAAG,EAAE,gBAAgB;YACrB,SAAS,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;SACrC,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9D,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/metadata/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./v-jarm-client-metadata.js"), exports);
|
|
18
|
+
__exportStar(require("./v-jarm-server-metadata.js"), exports);
|
|
19
|
+
__exportStar(require("./jarm-validate-metadata.js"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/metadata/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,8DAA4C;AAC5C,8DAA4C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const vJarmAuthResponseValidateMetadataInput: v.ObjectSchema<{
|
|
3
|
+
readonly client_metadata: v.UnionSchema<[v.ObjectSchema<{
|
|
4
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
5
|
+
readonly authorization_encrypted_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
6
|
+
readonly authorization_encrypted_response_enc: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
7
|
+
}, undefined>, v.ObjectSchema<{
|
|
8
|
+
readonly authorization_signed_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
9
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
10
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
11
|
+
}, undefined>, v.ObjectSchema<{
|
|
12
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
13
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
14
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
15
|
+
}, undefined>], undefined>;
|
|
16
|
+
readonly server_metadata: Omit<v.ObjectSchema<{
|
|
17
|
+
readonly authorization_signing_alg_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWS [RFC7515] signing algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to sign the response.">]>;
|
|
18
|
+
readonly authorization_encryption_alg_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>;
|
|
19
|
+
readonly authorization_encryption_enc_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (enc values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>;
|
|
20
|
+
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
21
|
+
readonly entries: {
|
|
22
|
+
readonly authorization_signing_alg_values_supported: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWS [RFC7515] signing algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to sign the response.">]>, never>;
|
|
23
|
+
readonly authorization_encryption_alg_values_supported: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>, never>;
|
|
24
|
+
readonly authorization_encryption_enc_values_supported: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (enc values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>, never>;
|
|
25
|
+
};
|
|
26
|
+
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
27
|
+
authorization_signing_alg_values_supported?: string[] | undefined;
|
|
28
|
+
authorization_encryption_alg_values_supported?: string[] | undefined;
|
|
29
|
+
authorization_encryption_enc_values_supported?: string[] | undefined;
|
|
30
|
+
}, v.StringIssue | v.ObjectIssue | v.ArrayIssue>;
|
|
31
|
+
readonly _types?: {
|
|
32
|
+
readonly input: {
|
|
33
|
+
authorization_signing_alg_values_supported?: string[] | undefined;
|
|
34
|
+
authorization_encryption_alg_values_supported?: string[] | undefined;
|
|
35
|
+
authorization_encryption_enc_values_supported?: string[] | undefined;
|
|
36
|
+
};
|
|
37
|
+
readonly output: {
|
|
38
|
+
authorization_signing_alg_values_supported?: string[] | undefined;
|
|
39
|
+
authorization_encryption_alg_values_supported?: string[] | undefined;
|
|
40
|
+
authorization_encryption_enc_values_supported?: string[] | undefined;
|
|
41
|
+
};
|
|
42
|
+
readonly issue: v.StringIssue | v.ObjectIssue | v.ArrayIssue;
|
|
43
|
+
} | undefined;
|
|
44
|
+
};
|
|
45
|
+
}, undefined>;
|
|
46
|
+
export type JarmMetadataValidate = v.InferInput<typeof vJarmAuthResponseValidateMetadataInput>;
|
|
47
|
+
export declare const vJarmMetadataValidateOut: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
48
|
+
readonly type: v.LiteralSchema<"signed", undefined>;
|
|
49
|
+
readonly client_metadata: v.ObjectSchema<{
|
|
50
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
51
|
+
readonly authorization_encrypted_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
52
|
+
readonly authorization_encrypted_response_enc: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
53
|
+
}, undefined>;
|
|
54
|
+
}, undefined>, v.ObjectSchema<{
|
|
55
|
+
readonly type: v.LiteralSchema<"encrypted", undefined>;
|
|
56
|
+
readonly client_metadata: v.ObjectSchema<{
|
|
57
|
+
readonly authorization_signed_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
58
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
59
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
60
|
+
}, undefined>;
|
|
61
|
+
}, undefined>, v.ObjectSchema<{
|
|
62
|
+
readonly type: v.LiteralSchema<"signed encrypted", undefined>;
|
|
63
|
+
readonly client_metadata: v.ObjectSchema<{
|
|
64
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
65
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
66
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
67
|
+
}, undefined>;
|
|
68
|
+
}, undefined>], undefined>;
|
|
69
|
+
export declare const jarmMetadataValidate: (vJarmMetadataValidate: JarmMetadataValidate) => v.InferOutput<typeof vJarmMetadataValidateOut>;
|
|
70
|
+
//# sourceMappingURL=jarm-validate-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jarm-validate-metadata.d.ts","sourceRoot":"","sources":["../../lib/metadata/jarm-validate-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAW7B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAGjD,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAE/F,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;0BAanC,CAAC;AAEH,eAAO,MAAM,oBAAoB,0BAA2B,oBAAoB,KAAG,EAAE,WAAW,CAAC,+BAA+B,CA+C/H,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.jarmMetadataValidate = exports.vJarmMetadataValidateOut = exports.vJarmAuthResponseValidateMetadataInput = void 0;
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
28
|
+
const v_jarm_client_metadata_js_1 = require("../metadata/v-jarm-client-metadata.js");
|
|
29
|
+
const v_jarm_server_metadata_js_1 = require("../metadata/v-jarm-server-metadata.js");
|
|
30
|
+
const utils_js_1 = require("../utils.js");
|
|
31
|
+
exports.vJarmAuthResponseValidateMetadataInput = v.object({
|
|
32
|
+
client_metadata: v_jarm_client_metadata_js_1.vJarmClientMetadata,
|
|
33
|
+
server_metadata: v.partial(v_jarm_server_metadata_js_1.vJarmServerMetadata),
|
|
34
|
+
});
|
|
35
|
+
exports.vJarmMetadataValidateOut = v.variant('type', [
|
|
36
|
+
v.object({
|
|
37
|
+
type: v.literal('signed'),
|
|
38
|
+
client_metadata: v_jarm_client_metadata_js_1.vJarmClientMetadataSign,
|
|
39
|
+
}),
|
|
40
|
+
v.object({
|
|
41
|
+
type: v.literal('encrypted'),
|
|
42
|
+
client_metadata: v_jarm_client_metadata_js_1.vJarmClientMetadataEncrypt,
|
|
43
|
+
}),
|
|
44
|
+
v.object({
|
|
45
|
+
type: v.literal('signed encrypted'),
|
|
46
|
+
client_metadata: v_jarm_client_metadata_js_1.vJarmClientMetadataSignEncrypt,
|
|
47
|
+
}),
|
|
48
|
+
]);
|
|
49
|
+
const jarmMetadataValidate = (vJarmMetadataValidate) => {
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
const { client_metadata, server_metadata } = vJarmMetadataValidate;
|
|
52
|
+
const { authorization_encrypted_response_alg, authorization_encrypted_response_enc, authorization_signed_response_alg } = client_metadata;
|
|
53
|
+
(0, utils_js_1.assertValueSupported)({
|
|
54
|
+
supported: (_a = server_metadata.authorization_signing_alg_values_supported) !== null && _a !== void 0 ? _a : [],
|
|
55
|
+
actual: authorization_signed_response_alg,
|
|
56
|
+
required: !!authorization_signed_response_alg,
|
|
57
|
+
error: new Error('Invalid authorization_signed_response_alg'),
|
|
58
|
+
});
|
|
59
|
+
(0, utils_js_1.assertValueSupported)({
|
|
60
|
+
supported: (_b = server_metadata.authorization_encryption_alg_values_supported) !== null && _b !== void 0 ? _b : [],
|
|
61
|
+
actual: authorization_encrypted_response_alg,
|
|
62
|
+
required: !!authorization_encrypted_response_alg,
|
|
63
|
+
error: new Error('Invalid authorization_encrypted_response_alg'),
|
|
64
|
+
});
|
|
65
|
+
(0, utils_js_1.assertValueSupported)({
|
|
66
|
+
supported: (_c = server_metadata.authorization_encryption_enc_values_supported) !== null && _c !== void 0 ? _c : [],
|
|
67
|
+
actual: authorization_encrypted_response_enc,
|
|
68
|
+
required: !!authorization_encrypted_response_enc,
|
|
69
|
+
error: new Error('Invalid authorization_encrypted_response_enc'),
|
|
70
|
+
});
|
|
71
|
+
if (authorization_signed_response_alg && authorization_encrypted_response_alg && authorization_encrypted_response_enc) {
|
|
72
|
+
return {
|
|
73
|
+
type: 'signed encrypted',
|
|
74
|
+
client_metadata: {
|
|
75
|
+
authorization_signed_response_alg,
|
|
76
|
+
authorization_encrypted_response_alg,
|
|
77
|
+
authorization_encrypted_response_enc,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
else if (authorization_signed_response_alg && !authorization_encrypted_response_alg && !authorization_encrypted_response_enc) {
|
|
82
|
+
return {
|
|
83
|
+
type: 'signed',
|
|
84
|
+
client_metadata: { authorization_signed_response_alg },
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
else if (!authorization_signed_response_alg && authorization_encrypted_response_alg && authorization_encrypted_response_enc) {
|
|
88
|
+
return {
|
|
89
|
+
type: 'encrypted',
|
|
90
|
+
client_metadata: { authorization_encrypted_response_alg, authorization_encrypted_response_enc },
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
throw new Error(`Invalid jarm client_metadata combination`);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
exports.jarmMetadataValidate = jarmMetadataValidate;
|
|
98
|
+
//# sourceMappingURL=jarm-validate-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jarm-validate-metadata.js","sourceRoot":"","sources":["../../lib/metadata/jarm-validate-metadata.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,qFAK+C;AAC/C,qFAA4E;AAC5E,0CAAmD;AAEtC,QAAA,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,eAAe,EAAE,+CAAmB;IACpC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,+CAAmB,CAAC;CAChD,CAAC,CAAC;AAGU,QAAA,wBAAwB,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;IACxD,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACzB,eAAe,EAAE,mDAAuB;KACzC,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;QAC5B,eAAe,EAAE,sDAA0B;KAC5C,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACnC,eAAe,EAAE,0DAA8B;KAChD,CAAC;CACH,CAAC,CAAC;AAEI,MAAM,oBAAoB,GAAG,CAAC,qBAA2C,EAAkD,EAAE;;IAClI,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,qBAAqB,CAAC;IACnE,MAAM,EAAE,oCAAoC,EAAE,oCAAoC,EAAE,iCAAiC,EAAE,GAAG,eAAe,CAAC;IAE1I,IAAA,+BAAoB,EAAC;QACnB,SAAS,EAAE,MAAA,eAAe,CAAC,0CAA0C,mCAAI,EAAE;QAC3E,MAAM,EAAE,iCAAiC;QACzC,QAAQ,EAAE,CAAC,CAAC,iCAAiC;QAC7C,KAAK,EAAE,IAAI,KAAK,CAAC,2CAA2C,CAAC;KAC9D,CAAC,CAAC;IAEH,IAAA,+BAAoB,EAAC;QACnB,SAAS,EAAE,MAAA,eAAe,CAAC,6CAA6C,mCAAI,EAAE;QAC9E,MAAM,EAAE,oCAAoC;QAC5C,QAAQ,EAAE,CAAC,CAAC,oCAAoC;QAChD,KAAK,EAAE,IAAI,KAAK,CAAC,8CAA8C,CAAC;KACjE,CAAC,CAAC;IAEH,IAAA,+BAAoB,EAAC;QACnB,SAAS,EAAE,MAAA,eAAe,CAAC,6CAA6C,mCAAI,EAAE;QAC9E,MAAM,EAAE,oCAAoC;QAC5C,QAAQ,EAAE,CAAC,CAAC,oCAAoC;QAChD,KAAK,EAAE,IAAI,KAAK,CAAC,8CAA8C,CAAC;KACjE,CAAC,CAAC;IAEH,IAAI,iCAAiC,IAAI,oCAAoC,IAAI,oCAAoC,EAAE,CAAC;QACtH,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,eAAe,EAAE;gBACf,iCAAiC;gBACjC,oCAAoC;gBACpC,oCAAoC;aACrC;SACF,CAAC;IACJ,CAAC;SAAM,IAAI,iCAAiC,IAAI,CAAC,oCAAoC,IAAI,CAAC,oCAAoC,EAAE,CAAC;QAC/H,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,EAAE,iCAAiC,EAAE;SACvD,CAAC;IACJ,CAAC;SAAM,IAAI,CAAC,iCAAiC,IAAI,oCAAoC,IAAI,oCAAoC,EAAE,CAAC;QAC9H,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,eAAe,EAAE,EAAE,oCAAoC,EAAE,oCAAoC,EAAE;SAChG,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC;AA/CW,QAAA,oBAAoB,wBA+C/B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const vJarmClientMetadataSign: v.ObjectSchema<{
|
|
3
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
4
|
+
readonly authorization_encrypted_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
5
|
+
readonly authorization_encrypted_response_enc: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
6
|
+
}, undefined>;
|
|
7
|
+
export declare const vJarmClientMetadataEncrypt: v.ObjectSchema<{
|
|
8
|
+
readonly authorization_signed_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
9
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
10
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
export declare const vJarmClientMetadataSignEncrypt: v.ObjectSchema<{
|
|
13
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
14
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
15
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Clients may register their public encryption keys using the jwks_uri or jwks metadata parameters.
|
|
19
|
+
*/
|
|
20
|
+
export declare const vJarmClientMetadata: v.UnionSchema<[v.ObjectSchema<{
|
|
21
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
22
|
+
readonly authorization_encrypted_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
23
|
+
readonly authorization_encrypted_response_enc: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
24
|
+
}, undefined>, v.ObjectSchema<{
|
|
25
|
+
readonly authorization_signed_response_alg: v.OptionalSchema<v.NeverSchema<undefined>, never>;
|
|
26
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
27
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
28
|
+
}, undefined>, v.ObjectSchema<{
|
|
29
|
+
readonly authorization_encrypted_response_alg: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
30
|
+
readonly authorization_encrypted_response_enc: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, "A128CBC-HS256">, v.DescriptionAction<string, "JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.">]>;
|
|
31
|
+
readonly authorization_signed_response_alg: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, never>, v.DescriptionAction<string | undefined, "JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.">]>;
|
|
32
|
+
}, undefined>], undefined>;
|
|
33
|
+
export type JarmClientMetadata = v.InferInput<typeof vJarmClientMetadata>;
|
|
34
|
+
//# sourceMappingURL=v-jarm-client-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-client-metadata.d.ts","sourceRoot":"","sources":["../../lib/metadata/v-jarm-client-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,uBAAuB;;;;aAUlC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;aAerC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;aAGzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;0BAAiG,CAAC;AAElI,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.vJarmClientMetadata = exports.vJarmClientMetadataSignEncrypt = exports.vJarmClientMetadataEncrypt = exports.vJarmClientMetadataSign = void 0;
|
|
27
|
+
const v = __importStar(require("valibot"));
|
|
28
|
+
exports.vJarmClientMetadataSign = v.object({
|
|
29
|
+
authorization_signed_response_alg: v.pipe(v.optional(v.string()), // @default 'RS256' This makes no sense with openid4vp if just encrypted can be specified
|
|
30
|
+
v.description('JWA. If this is specified, the response will be signed using JWS and the configured algorithm. The algorithm none is not allowed.')),
|
|
31
|
+
authorization_encrypted_response_alg: v.optional(v.never()),
|
|
32
|
+
authorization_encrypted_response_enc: v.optional(v.never()),
|
|
33
|
+
});
|
|
34
|
+
exports.vJarmClientMetadataEncrypt = v.object({
|
|
35
|
+
authorization_signed_response_alg: v.optional(v.never()),
|
|
36
|
+
authorization_encrypted_response_alg: v.pipe(v.string(), v.description('JWE alg algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.')),
|
|
37
|
+
authorization_encrypted_response_enc: v.pipe(v.optional(v.string(), 'A128CBC-HS256'), v.description('JWE enc algorithm JWA. If both signing and encryption are requested, the response will be signed then encrypted with the provided algorithm.')),
|
|
38
|
+
});
|
|
39
|
+
exports.vJarmClientMetadataSignEncrypt = v.object(Object.assign(Object.assign({}, v.pick(exports.vJarmClientMetadataSign, ['authorization_signed_response_alg']).entries), v.pick(exports.vJarmClientMetadataEncrypt, ['authorization_encrypted_response_alg', 'authorization_encrypted_response_enc']).entries));
|
|
40
|
+
/**
|
|
41
|
+
* Clients may register their public encryption keys using the jwks_uri or jwks metadata parameters.
|
|
42
|
+
*/
|
|
43
|
+
exports.vJarmClientMetadata = v.union([exports.vJarmClientMetadataSign, exports.vJarmClientMetadataEncrypt, exports.vJarmClientMetadataSignEncrypt]);
|
|
44
|
+
//# sourceMappingURL=v-jarm-client-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-client-metadata.js","sourceRoot":"","sources":["../../lib/metadata/v-jarm-client-metadata.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAEhB,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,iCAAiC,EAAE,CAAC,CAAC,IAAI,CACvC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,0FAA0F;IAClH,CAAC,CAAC,WAAW,CACX,mIAAmI,CACpI,CACF;IAED,oCAAoC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3D,oCAAoC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,iCAAiC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IACxD,oCAAoC,EAAE,CAAC,CAAC,IAAI,CAC1C,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,WAAW,CACX,8IAA8I,CAC/I,CACF;IAED,oCAAoC,EAAE,CAAC,CAAC,IAAI,CAC1C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,EACvC,CAAC,CAAC,WAAW,CACX,8IAA8I,CAC/I,CACF;CACF,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,CAAC,CAAC,MAAM,iCACjD,CAAC,CAAC,IAAI,CAAC,+BAAuB,EAAE,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,GAC9E,CAAC,CAAC,IAAI,CAAC,kCAA0B,EAAE,CAAC,sCAAsC,EAAE,sCAAsC,CAAC,CAAC,CAAC,OAAO,EAC/H,CAAC;AAEH;;GAEG;AACU,QAAA,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,+BAAuB,EAAE,kCAA0B,EAAE,sCAA8B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Authorization servers SHOULD publish the supported algorithms for signing and encrypting the JWT of an authorization response by utilizing OAuth 2.0 Authorization Server Metadata [RFC8414] parameters.
|
|
4
|
+
*/
|
|
5
|
+
export declare const vJarmServerMetadata: v.ObjectSchema<{
|
|
6
|
+
readonly authorization_signing_alg_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWS [RFC7515] signing algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to sign the response.">]>;
|
|
7
|
+
readonly authorization_encryption_alg_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (alg values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>;
|
|
8
|
+
readonly authorization_encryption_enc_values_supported: v.SchemaWithPipe<[v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "JSON array containing a list of the JWE [RFC7516] encryption algorithms (enc values) JWA [RFC7518] supported by the authorization endpoint to encrypt the response.">]>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
export type JarmServerMetadata = v.InferInput<typeof vJarmServerMetadata>;
|
|
11
|
+
//# sourceMappingURL=v-jarm-server-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-jarm-server-metadata.d.ts","sourceRoot":"","sources":["../../lib/metadata/v-jarm-server-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;aAqB9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|