@atproto/oauth-types 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/LICENSE.txt +7 -0
- package/README.md +3 -0
- package/dist/access-token.d.ts +4 -0
- package/dist/access-token.d.ts.map +1 -0
- package/dist/access-token.js +6 -0
- package/dist/access-token.js.map +1 -0
- package/dist/atproto-loopback-client-metadata.d.ts +3 -0
- package/dist/atproto-loopback-client-metadata.d.ts.map +1 -0
- package/dist/atproto-loopback-client-metadata.js +26 -0
- package/dist/atproto-loopback-client-metadata.js.map +1 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +11 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/oauth-authentication-request-parameters.d.ts +128 -0
- package/dist/oauth-authentication-request-parameters.d.ts.map +1 -0
- package/dist/oauth-authentication-request-parameters.js +76 -0
- package/dist/oauth-authentication-request-parameters.js.map +1 -0
- package/dist/oauth-authorization-details.d.ts +54 -0
- package/dist/oauth-authorization-details.d.ts.map +1 -0
- package/dist/oauth-authorization-details.js +20 -0
- package/dist/oauth-authorization-details.js.map +1 -0
- package/dist/oauth-authorization-server-metadata.d.ts +428 -0
- package/dist/oauth-authorization-server-metadata.d.ts.map +1 -0
- package/dist/oauth-authorization-server-metadata.js +88 -0
- package/dist/oauth-authorization-server-metadata.js.map +1 -0
- package/dist/oauth-client-credentials.d.ts +66 -0
- package/dist/oauth-client-credentials.d.ts.map +1 -0
- package/dist/oauth-client-credentials.js +30 -0
- package/dist/oauth-client-credentials.js.map +1 -0
- package/dist/oauth-client-id-discoverable.d.ts +8 -0
- package/dist/oauth-client-id-discoverable.d.ts.map +1 -0
- package/dist/oauth-client-id-discoverable.js +48 -0
- package/dist/oauth-client-id-discoverable.js.map +1 -0
- package/dist/oauth-client-id-loopback.d.ts +5 -0
- package/dist/oauth-client-id-loopback.d.ts.map +1 -0
- package/dist/oauth-client-id-loopback.js +44 -0
- package/dist/oauth-client-id-loopback.js.map +1 -0
- package/dist/oauth-client-id-url.d.ts +3 -0
- package/dist/oauth-client-id-url.d.ts.map +1 -0
- package/dist/oauth-client-id-url.js +21 -0
- package/dist/oauth-client-id-url.js.map +1 -0
- package/dist/oauth-client-id.d.ts +4 -0
- package/dist/oauth-client-id.d.ts.map +1 -0
- package/dist/oauth-client-id.js +6 -0
- package/dist/oauth-client-id.js.map +1 -0
- package/dist/oauth-client-identification.d.ts +31 -0
- package/dist/oauth-client-identification.d.ts.map +1 -0
- package/dist/oauth-client-identification.js +12 -0
- package/dist/oauth-client-identification.js.map +1 -0
- package/dist/oauth-client-metadata.d.ts +1576 -0
- package/dist/oauth-client-metadata.d.ts.map +1 -0
- package/dist/oauth-client-metadata.js +70 -0
- package/dist/oauth-client-metadata.js.map +1 -0
- package/dist/oauth-endpoint-auth-method.d.ts +4 -0
- package/dist/oauth-endpoint-auth-method.d.ts.map +1 -0
- package/dist/oauth-endpoint-auth-method.js +14 -0
- package/dist/oauth-endpoint-auth-method.js.map +1 -0
- package/dist/oauth-endpoint-name.d.ts +2 -0
- package/dist/oauth-endpoint-name.d.ts.map +1 -0
- package/dist/oauth-endpoint-name.js +3 -0
- package/dist/oauth-endpoint-name.js.map +1 -0
- package/dist/oauth-grant-type.d.ts +4 -0
- package/dist/oauth-grant-type.d.ts.map +1 -0
- package/dist/oauth-grant-type.js +14 -0
- package/dist/oauth-grant-type.js.map +1 -0
- package/dist/oauth-issuer-identifier.d.ts +3 -0
- package/dist/oauth-issuer-identifier.d.ts.map +1 -0
- package/dist/oauth-issuer-identifier.js +59 -0
- package/dist/oauth-issuer-identifier.js.map +1 -0
- package/dist/oauth-par-response.d.ts +10 -0
- package/dist/oauth-par-response.d.ts.map +1 -0
- package/dist/oauth-par-response.js +8 -0
- package/dist/oauth-par-response.js.map +1 -0
- package/dist/oauth-protected-resource-metadata.d.ts +90 -0
- package/dist/oauth-protected-resource-metadata.d.ts.map +1 -0
- package/dist/oauth-protected-resource-metadata.js +75 -0
- package/dist/oauth-protected-resource-metadata.js.map +1 -0
- package/dist/oauth-response-mode.d.ts +4 -0
- package/dist/oauth-response-mode.d.ts.map +1 -0
- package/dist/oauth-response-mode.js +10 -0
- package/dist/oauth-response-mode.js.map +1 -0
- package/dist/oauth-response-type.d.ts +4 -0
- package/dist/oauth-response-type.d.ts.map +1 -0
- package/dist/oauth-response-type.js +17 -0
- package/dist/oauth-response-type.js.map +1 -0
- package/dist/oauth-token-response.d.ts +103 -0
- package/dist/oauth-token-response.d.ts.map +1 -0
- package/dist/oauth-token-response.js +26 -0
- package/dist/oauth-token-response.js.map +1 -0
- package/dist/oauth-token-type.d.ts +4 -0
- package/dist/oauth-token-type.d.ts.map +1 -0
- package/dist/oauth-token-type.js +16 -0
- package/dist/oauth-token-type.js.map +1 -0
- package/dist/oidc-claims-parameter.d.ts +4 -0
- package/dist/oidc-claims-parameter.d.ts.map +1 -0
- package/dist/oidc-claims-parameter.js +36 -0
- package/dist/oidc-claims-parameter.js.map +1 -0
- package/dist/oidc-claims-properties.d.ts +16 -0
- package/dist/oidc-claims-properties.d.ts.map +1 -0
- package/dist/oidc-claims-properties.js +11 -0
- package/dist/oidc-claims-properties.js.map +1 -0
- package/dist/oidc-entity-type.d.ts +4 -0
- package/dist/oidc-entity-type.d.ts.map +1 -0
- package/dist/oidc-entity-type.js +6 -0
- package/dist/oidc-entity-type.js.map +1 -0
- package/dist/util.d.ts +5 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +23 -0
- package/dist/util.js.map +1 -0
- package/package.json +37 -0
- package/src/access-token.ts +4 -0
- package/src/atproto-loopback-client-metadata.ts +30 -0
- package/src/constants.ts +9 -0
- package/src/index.ts +27 -0
- package/src/oauth-authentication-request-parameters.ts +104 -0
- package/src/oauth-authorization-details.ts +28 -0
- package/src/oauth-authorization-server-metadata.ts +106 -0
- package/src/oauth-client-credentials.ts +34 -0
- package/src/oauth-client-id-discoverable.ts +66 -0
- package/src/oauth-client-id-loopback.ts +58 -0
- package/src/oauth-client-id-url.ts +25 -0
- package/src/oauth-client-id.ts +4 -0
- package/src/oauth-client-identification.ts +14 -0
- package/src/oauth-client-metadata.ts +75 -0
- package/src/oauth-endpoint-auth-method.ts +13 -0
- package/src/oauth-endpoint-name.ts +5 -0
- package/src/oauth-grant-type.ts +13 -0
- package/src/oauth-issuer-identifier.ts +61 -0
- package/src/oauth-par-response.ts +7 -0
- package/src/oauth-protected-resource-metadata.ts +85 -0
- package/src/oauth-response-mode.ts +9 -0
- package/src/oauth-response-type.ts +17 -0
- package/src/oauth-token-response.ts +29 -0
- package/src/oauth-token-type.ts +15 -0
- package/src/oidc-claims-parameter.ts +40 -0
- package/src/oidc-claims-properties.ts +11 -0
- package/src/oidc-entity-type.ts +5 -0
- package/src/util.ts +20 -0
- package/tsconfig.build.json +8 -0
- package/tsconfig.json +4 -0
package/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# @atproto/oauth-types
|
2
|
+
|
3
|
+
## 0.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#2482](https://github.com/bluesky-social/atproto/pull/2482) [`a8d6c1123`](https://github.com/bluesky-social/atproto/commit/a8d6c112359f5c4c0cfbe2df63443ed275f2a646) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add OAuth provider capability & support for DPoP signed tokens
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- Updated dependencies [[`a8d6c1123`](https://github.com/bluesky-social/atproto/commit/a8d6c112359f5c4c0cfbe2df63443ed275f2a646)]:
|
12
|
+
- @atproto/jwk@0.1.0
|
package/LICENSE.txt
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Dual MIT/Apache-2.0 License
|
2
|
+
|
3
|
+
Copyright (c) 2022-2024 Bluesky PBC, and Contributors
|
4
|
+
|
5
|
+
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
6
|
+
|
7
|
+
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"access-token.d.ts","sourceRoot":"","sources":["../src/access-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,aAAoB,CAAA;AAClD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"access-token.js","sourceRoot":"","sources":["../src/access-token.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"atproto-loopback-client-metadata.d.ts","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAGrE,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,GACf,wBAAwB,CAuB1B"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.atprotoLoopbackClientMetadata = void 0;
|
4
|
+
const oauth_client_id_loopback_js_1 = require("./oauth-client-id-loopback.js");
|
5
|
+
const oauth_client_id_url_js_1 = require("./oauth-client-id-url.js");
|
6
|
+
function atprotoLoopbackClientMetadata(clientId) {
|
7
|
+
if (!(0, oauth_client_id_loopback_js_1.isOAuthClientIdLoopback)(clientId)) {
|
8
|
+
throw new TypeError(`Invalid loopback client ID ${clientId}`);
|
9
|
+
}
|
10
|
+
const { origin, pathname, searchParams } = (0, oauth_client_id_url_js_1.parseOAuthClientIdUrl)(clientId);
|
11
|
+
return {
|
12
|
+
client_id: clientId,
|
13
|
+
client_name: 'Loopback client',
|
14
|
+
response_types: ['code id_token', 'code'],
|
15
|
+
grant_types: ['authorization_code', 'implicit', 'refresh_token'],
|
16
|
+
scope: 'openid profile offline_access',
|
17
|
+
redirect_uris: searchParams.has('redirect_uri')
|
18
|
+
? searchParams.getAll('redirect_uri')
|
19
|
+
: ['127.0.0.1', '[::1]'].map((ip) => Object.assign(new URL(pathname, origin), { hostname: ip }).href),
|
20
|
+
token_endpoint_auth_method: 'none',
|
21
|
+
application_type: 'native',
|
22
|
+
dpop_bound_access_tokens: true,
|
23
|
+
};
|
24
|
+
}
|
25
|
+
exports.atprotoLoopbackClientMetadata = atprotoLoopbackClientMetadata;
|
26
|
+
//# sourceMappingURL=atproto-loopback-client-metadata.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"atproto-loopback-client-metadata.js","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":";;;AAAA,+EAAuE;AAEvE,qEAAgE;AAEhE,SAAgB,6BAA6B,CAC3C,QAAgB;IAEhB,IAAI,CAAC,IAAA,qDAAuB,EAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,SAAS,CAAC,8BAA8B,QAAQ,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,8CAAqB,EAAC,QAAQ,CAAC,CAAA;IAE1E,OAAO;QACL,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,iBAAiB;QAC9B,cAAc,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC;QACzC,WAAW,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,eAAe,CAAC;QAChE,KAAK,EAAE,+BAA+B;QACtC,aAAa,EAAE,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC;YAC7C,CAAC,CAAE,YAAY,CAAC,MAAM,CAAC,cAAc,CAA2B;YAChE,CAAC,CAAE,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,GAAG,CACzB,CAAC,EAAE,EAAE,EAAE,CACL,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CACxC;QAC/B,0BAA0B,EAAE,MAAM;QAClC,gBAAgB,EAAE,QAAQ;QAC1B,wBAAwB,EAAE,IAAI;KAC/B,CAAA;AACH,CAAC;AAzBD,sEAyBC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const CLIENT_ASSERTION_TYPE_JWT_BEARER = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
|
2
|
+
export declare const OAUTH_AUTHENTICATED_ENDPOINT_NAMES: readonly ["token", "revocation", "introspection", "pushed_authorization_request"];
|
3
|
+
//# sourceMappingURL=constants.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,2DACa,CAAA;AAE1D,eAAO,MAAM,kCAAkC,mFAKrC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OAUTH_AUTHENTICATED_ENDPOINT_NAMES = exports.CLIENT_ASSERTION_TYPE_JWT_BEARER = void 0;
|
4
|
+
exports.CLIENT_ASSERTION_TYPE_JWT_BEARER = 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer';
|
5
|
+
exports.OAUTH_AUTHENTICATED_ENDPOINT_NAMES = [
|
6
|
+
'token',
|
7
|
+
'revocation',
|
8
|
+
'introspection',
|
9
|
+
'pushed_authorization_request',
|
10
|
+
];
|
11
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAC3C,wDAAwD,CAAA;AAE7C,QAAA,kCAAkC,GAAG;IAChD,OAAO;IACP,YAAY;IACZ,eAAe;IACf,8BAA8B;CACtB,CAAA"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
export * from './constants.js';
|
2
|
+
export * from './util.js';
|
3
|
+
export * from './access-token.js';
|
4
|
+
export * from './atproto-loopback-client-metadata.js';
|
5
|
+
export * from './oauth-client-id-discoverable.js';
|
6
|
+
export * from './oauth-client-id-loopback.js';
|
7
|
+
export * from './oauth-authentication-request-parameters.js';
|
8
|
+
export * from './oauth-authorization-details.js';
|
9
|
+
export * from './oauth-authorization-server-metadata.js';
|
10
|
+
export * from './oauth-client-credentials.js';
|
11
|
+
export * from './oauth-client-id.js';
|
12
|
+
export * from './oauth-client-identification.js';
|
13
|
+
export * from './oauth-client-metadata.js';
|
14
|
+
export * from './oauth-endpoint-auth-method.js';
|
15
|
+
export * from './oauth-endpoint-name.js';
|
16
|
+
export * from './oauth-grant-type.js';
|
17
|
+
export * from './oauth-issuer-identifier.js';
|
18
|
+
export * from './oauth-par-response.js';
|
19
|
+
export * from './oauth-protected-resource-metadata.js';
|
20
|
+
export * from './oauth-response-mode.js';
|
21
|
+
export * from './oauth-response-type.js';
|
22
|
+
export * from './oauth-token-response.js';
|
23
|
+
export * from './oauth-token-type.js';
|
24
|
+
export * from './oidc-claims-parameter.js';
|
25
|
+
export * from './oidc-claims-properties.js';
|
26
|
+
export * from './oidc-entity-type.js';
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AAEzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,uCAAuC,CAAA;AACrD,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8CAA8C,CAAA;AAC5D,cAAc,kCAAkC,CAAA;AAChD,cAAc,0CAA0C,CAAA;AACxD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,wCAAwC,CAAA;AACtD,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,43 @@
|
|
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("./constants.js"), exports);
|
18
|
+
__exportStar(require("./util.js"), exports);
|
19
|
+
__exportStar(require("./access-token.js"), exports);
|
20
|
+
__exportStar(require("./atproto-loopback-client-metadata.js"), exports);
|
21
|
+
__exportStar(require("./oauth-client-id-discoverable.js"), exports);
|
22
|
+
__exportStar(require("./oauth-client-id-loopback.js"), exports);
|
23
|
+
__exportStar(require("./oauth-authentication-request-parameters.js"), exports);
|
24
|
+
__exportStar(require("./oauth-authorization-details.js"), exports);
|
25
|
+
__exportStar(require("./oauth-authorization-server-metadata.js"), exports);
|
26
|
+
__exportStar(require("./oauth-client-credentials.js"), exports);
|
27
|
+
__exportStar(require("./oauth-client-id.js"), exports);
|
28
|
+
__exportStar(require("./oauth-client-identification.js"), exports);
|
29
|
+
__exportStar(require("./oauth-client-metadata.js"), exports);
|
30
|
+
__exportStar(require("./oauth-endpoint-auth-method.js"), exports);
|
31
|
+
__exportStar(require("./oauth-endpoint-name.js"), exports);
|
32
|
+
__exportStar(require("./oauth-grant-type.js"), exports);
|
33
|
+
__exportStar(require("./oauth-issuer-identifier.js"), exports);
|
34
|
+
__exportStar(require("./oauth-par-response.js"), exports);
|
35
|
+
__exportStar(require("./oauth-protected-resource-metadata.js"), exports);
|
36
|
+
__exportStar(require("./oauth-response-mode.js"), exports);
|
37
|
+
__exportStar(require("./oauth-response-type.js"), exports);
|
38
|
+
__exportStar(require("./oauth-token-response.js"), exports);
|
39
|
+
__exportStar(require("./oauth-token-type.js"), exports);
|
40
|
+
__exportStar(require("./oidc-claims-parameter.js"), exports);
|
41
|
+
__exportStar(require("./oidc-claims-properties.js"), exports);
|
42
|
+
__exportStar(require("./oidc-entity-type.js"), exports);
|
43
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,4CAAyB;AAEzB,oDAAiC;AACjC,wEAAqD;AACrD,oEAAiD;AACjD,gEAA6C;AAC7C,+EAA4D;AAC5D,mEAAgD;AAChD,2EAAwD;AACxD,gEAA6C;AAC7C,uDAAoC;AACpC,mEAAgD;AAChD,6DAA0C;AAC1C,kEAA+C;AAC/C,2DAAwC;AACxC,wDAAqC;AACrC,+DAA4C;AAC5C,0DAAuC;AACvC,yEAAsD;AACtD,2DAAwC;AACxC,2DAAwC;AACxC,4DAAyC;AACzC,wDAAqC;AACrC,6DAA0C;AAC1C,8DAA2C;AAC3C,wDAAqC"}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
/**
|
3
|
+
* @see {@link https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest | OIDC}
|
4
|
+
*/
|
5
|
+
export declare const oauthAuthenticationRequestParametersSchema: z.ZodObject<{
|
6
|
+
client_id: z.ZodString;
|
7
|
+
state: z.ZodOptional<z.ZodString>;
|
8
|
+
nonce: z.ZodOptional<z.ZodString>;
|
9
|
+
dpop_jkt: z.ZodOptional<z.ZodString>;
|
10
|
+
response_type: z.ZodEnum<["code", "token", "id_token", "none", "code token", "code id_token", "id_token token", "code id_token token"]>;
|
11
|
+
response_mode: z.ZodOptional<z.ZodEnum<["query", "fragment", "form_post"]>>;
|
12
|
+
code_challenge: z.ZodOptional<z.ZodString>;
|
13
|
+
code_challenge_method: z.ZodOptional<z.ZodDefault<z.ZodEnum<["S256", "plain"]>>>;
|
14
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
15
|
+
scope: z.ZodOptional<z.ZodString>;
|
16
|
+
max_age: z.ZodOptional<z.ZodNumber>;
|
17
|
+
claims: z.ZodOptional<z.ZodRecord<z.ZodEnum<["userinfo", "id_token"]>, z.ZodRecord<z.ZodEnum<["auth_time", "nonce", "acr", "name", "family_name", "given_name", "middle_name", "nickname", "preferred_username", "gender", "picture", "profile", "website", "birthdate", "zoneinfo", "locale", "updated_at", "email", "email_verified", "phone_number", "phone_number_verified", "address"]>, z.ZodUnion<[z.ZodLiteral<null>, z.ZodObject<{
|
18
|
+
essential: z.ZodOptional<z.ZodBoolean>;
|
19
|
+
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
20
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
22
|
+
values?: (string | number | boolean)[] | undefined;
|
23
|
+
value?: string | number | boolean | undefined;
|
24
|
+
essential?: boolean | undefined;
|
25
|
+
}, {
|
26
|
+
values?: (string | number | boolean)[] | undefined;
|
27
|
+
value?: string | number | boolean | undefined;
|
28
|
+
essential?: boolean | undefined;
|
29
|
+
}>]>>>>;
|
30
|
+
login_hint: z.ZodOptional<z.ZodString>;
|
31
|
+
ui_locales: z.ZodOptional<z.ZodString>;
|
32
|
+
id_token_hint: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
33
|
+
display: z.ZodOptional<z.ZodEnum<["page", "popup", "touch"]>>;
|
34
|
+
/**
|
35
|
+
* - "none" will only be allowed if the user already allowed the client on the same device
|
36
|
+
* - "login" will force the user to login again, unless he very recently logged in
|
37
|
+
* - "consent" will force the user to consent again
|
38
|
+
* - "select_account" will force the user to select an account
|
39
|
+
*/
|
40
|
+
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
41
|
+
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
42
|
+
type: z.ZodString;
|
43
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
44
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
45
|
+
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
46
|
+
identifier: z.ZodOptional<z.ZodString>;
|
47
|
+
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
49
|
+
type: string;
|
50
|
+
locations?: string[] | undefined;
|
51
|
+
actions?: string[] | undefined;
|
52
|
+
datatypes?: string[] | undefined;
|
53
|
+
identifier?: string | undefined;
|
54
|
+
privileges?: string[] | undefined;
|
55
|
+
}, {
|
56
|
+
type: string;
|
57
|
+
locations?: string[] | undefined;
|
58
|
+
actions?: string[] | undefined;
|
59
|
+
datatypes?: string[] | undefined;
|
60
|
+
identifier?: string | undefined;
|
61
|
+
privileges?: string[] | undefined;
|
62
|
+
}>, "many">>;
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
64
|
+
client_id: string;
|
65
|
+
response_type: "code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token";
|
66
|
+
scope?: string | undefined;
|
67
|
+
redirect_uri?: string | undefined;
|
68
|
+
nonce?: string | undefined;
|
69
|
+
state?: string | undefined;
|
70
|
+
dpop_jkt?: string | undefined;
|
71
|
+
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
72
|
+
code_challenge?: string | undefined;
|
73
|
+
code_challenge_method?: "S256" | "plain" | undefined;
|
74
|
+
max_age?: number | undefined;
|
75
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
76
|
+
values?: (string | number | boolean)[] | undefined;
|
77
|
+
value?: string | number | boolean | undefined;
|
78
|
+
essential?: boolean | undefined;
|
79
|
+
} | null>>>> | undefined;
|
80
|
+
login_hint?: string | undefined;
|
81
|
+
ui_locales?: string | undefined;
|
82
|
+
id_token_hint?: `${string}.${string}.${string}` | undefined;
|
83
|
+
display?: "page" | "popup" | "touch" | undefined;
|
84
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
85
|
+
authorization_details?: {
|
86
|
+
type: string;
|
87
|
+
locations?: string[] | undefined;
|
88
|
+
actions?: string[] | undefined;
|
89
|
+
datatypes?: string[] | undefined;
|
90
|
+
identifier?: string | undefined;
|
91
|
+
privileges?: string[] | undefined;
|
92
|
+
}[] | undefined;
|
93
|
+
}, {
|
94
|
+
client_id: string;
|
95
|
+
response_type: "code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token";
|
96
|
+
scope?: string | undefined;
|
97
|
+
redirect_uri?: string | undefined;
|
98
|
+
nonce?: string | undefined;
|
99
|
+
state?: string | undefined;
|
100
|
+
dpop_jkt?: string | undefined;
|
101
|
+
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
102
|
+
code_challenge?: string | undefined;
|
103
|
+
code_challenge_method?: "S256" | "plain" | undefined;
|
104
|
+
max_age?: number | undefined;
|
105
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
106
|
+
values?: (string | number | boolean)[] | undefined;
|
107
|
+
value?: string | number | boolean | undefined;
|
108
|
+
essential?: boolean | undefined;
|
109
|
+
} | null>>>> | undefined;
|
110
|
+
login_hint?: string | undefined;
|
111
|
+
ui_locales?: string | undefined;
|
112
|
+
id_token_hint?: string | undefined;
|
113
|
+
display?: "page" | "popup" | "touch" | undefined;
|
114
|
+
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
115
|
+
authorization_details?: {
|
116
|
+
type: string;
|
117
|
+
locations?: string[] | undefined;
|
118
|
+
actions?: string[] | undefined;
|
119
|
+
datatypes?: string[] | undefined;
|
120
|
+
identifier?: string | undefined;
|
121
|
+
privileges?: string[] | undefined;
|
122
|
+
}[] | undefined;
|
123
|
+
}>;
|
124
|
+
/**
|
125
|
+
* @see {oauthAuthenticationRequestParametersSchema}
|
126
|
+
*/
|
127
|
+
export type OAuthAuthenticationRequestParameters = z.infer<typeof oauthAuthenticationRequestParametersSchema>;
|
128
|
+
//# sourceMappingURL=oauth-authentication-request-parameters.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-authentication-request-parameters.d.ts","sourceRoot":"","sources":["../src/oauth-authentication-request-parameters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB;;GAEG;AACH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0ErD;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAA"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.oauthAuthenticationRequestParametersSchema = void 0;
|
4
|
+
const jwk_1 = require("@atproto/jwk");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
const oauth_authorization_details_js_1 = require("./oauth-authorization-details.js");
|
7
|
+
const oauth_client_id_js_1 = require("./oauth-client-id.js");
|
8
|
+
const oidc_claims_parameter_js_1 = require("./oidc-claims-parameter.js");
|
9
|
+
const oidc_claims_properties_js_1 = require("./oidc-claims-properties.js");
|
10
|
+
const oidc_entity_type_js_1 = require("./oidc-entity-type.js");
|
11
|
+
/**
|
12
|
+
* @see {@link https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest | OIDC}
|
13
|
+
*/
|
14
|
+
exports.oauthAuthenticationRequestParametersSchema = zod_1.z.object({
|
15
|
+
client_id: oauth_client_id_js_1.oauthClientIdSchema,
|
16
|
+
state: zod_1.z.string().optional(),
|
17
|
+
nonce: zod_1.z.string().optional(),
|
18
|
+
dpop_jkt: zod_1.z.string().optional(),
|
19
|
+
response_type: zod_1.z.enum([
|
20
|
+
// OAuth2 (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#section-4.1.1)
|
21
|
+
'code',
|
22
|
+
'token',
|
23
|
+
// OIDC (https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html)
|
24
|
+
'id_token',
|
25
|
+
'none',
|
26
|
+
'code token',
|
27
|
+
'code id_token',
|
28
|
+
'id_token token',
|
29
|
+
'code id_token token',
|
30
|
+
]),
|
31
|
+
// Default depend on response_type
|
32
|
+
response_mode: zod_1.z.enum(['query', 'fragment', 'form_post']).optional(),
|
33
|
+
// PKCE
|
34
|
+
code_challenge: zod_1.z.string().optional(),
|
35
|
+
code_challenge_method: zod_1.z.enum(['S256', 'plain']).default('S256').optional(),
|
36
|
+
redirect_uri: zod_1.z.string().url().optional(),
|
37
|
+
// email profile openid (other?)
|
38
|
+
scope: zod_1.z
|
39
|
+
.string()
|
40
|
+
.regex(/^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+)*$/)
|
41
|
+
.optional(),
|
42
|
+
// OIDC
|
43
|
+
// Specifies the allowable elapsed time in seconds since the last time the
|
44
|
+
// End-User was actively authenticated by the OP. If the elapsed time is
|
45
|
+
// greater than this value, the OP MUST attempt to actively re-authenticate
|
46
|
+
// the End-User. (The max_age request parameter corresponds to the OpenID 2.0
|
47
|
+
// PAPE [OpenID.PAPE] max_auth_age request parameter.) When max_age is used,
|
48
|
+
// the ID Token returned MUST include an auth_time Claim Value. Note that
|
49
|
+
// max_age=0 is equivalent to prompt=login.
|
50
|
+
max_age: zod_1.z.number().int().min(0).optional(),
|
51
|
+
claims: zod_1.z
|
52
|
+
.record(oidc_entity_type_js_1.oidcEntityTypeSchema, zod_1.z.record(oidc_claims_parameter_js_1.oidcClaimsParameterSchema, zod_1.z.union([zod_1.z.literal(null), oidc_claims_properties_js_1.oidcClaimsPropertiesSchema])))
|
53
|
+
.optional(),
|
54
|
+
// https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter
|
55
|
+
// Not supported by this library (yet?)
|
56
|
+
// registration: clientMetadataSchema.optional(),
|
57
|
+
login_hint: zod_1.z.string().min(1).optional(),
|
58
|
+
ui_locales: zod_1.z
|
59
|
+
.string()
|
60
|
+
.regex(/^[a-z]{2}(-[A-Z]{2})?( [a-z]{2}(-[A-Z]{2})?)*$/) // fr-CA fr en
|
61
|
+
.optional(),
|
62
|
+
// Previous ID Token, should be provided when prompt=none is used
|
63
|
+
id_token_hint: jwk_1.signedJwtSchema.optional(),
|
64
|
+
// Type of UI the AS is displayed on
|
65
|
+
display: zod_1.z.enum(['page', 'popup', 'touch']).optional(),
|
66
|
+
/**
|
67
|
+
* - "none" will only be allowed if the user already allowed the client on the same device
|
68
|
+
* - "login" will force the user to login again, unless he very recently logged in
|
69
|
+
* - "consent" will force the user to consent again
|
70
|
+
* - "select_account" will force the user to select an account
|
71
|
+
*/
|
72
|
+
prompt: zod_1.z.enum(['none', 'login', 'consent', 'select_account']).optional(),
|
73
|
+
// https://datatracker.ietf.org/doc/html/rfc9396
|
74
|
+
authorization_details: oauth_authorization_details_js_1.oauthAuthorizationDetailsSchema.optional(),
|
75
|
+
});
|
76
|
+
//# sourceMappingURL=oauth-authentication-request-parameters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-authentication-request-parameters.js","sourceRoot":"","sources":["../src/oauth-authentication-request-parameters.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,6DAA0D;AAC1D,yEAAsE;AACtE,2EAAwE;AACxE,+DAA4D;AAE5D;;GAEG;AACU,QAAA,0CAA0C,GAAG,OAAC,CAAC,MAAM,CAAC;IACjE,SAAS,EAAE,wCAAmB;IAE9B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE/B,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC;QACpB,wFAAwF;QACxF,MAAM;QACN,OAAO;QAEP,4EAA4E;QAC5E,UAAU;QACV,MAAM;QACN,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,qBAAqB;KACtB,CAAC;IAEF,kCAAkC;IAClC,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEpE,OAAO;IACP,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,qBAAqB,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAE3E,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAEzC,gCAAgC;IAChC,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,KAAK,CAAC,kCAAkC,CAAC;SACzC,QAAQ,EAAE;IAEb,OAAO;IAEP,0EAA0E;IAC1E,wEAAwE;IACxE,2EAA2E;IAC3E,6EAA6E;IAC7E,4EAA4E;IAC5E,yEAAyE;IACzE,2CAA2C;IAC3C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE3C,MAAM,EAAE,OAAC;SACN,MAAM,CACL,0CAAoB,EACpB,OAAC,CAAC,MAAM,CACN,oDAAyB,EACzB,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,sDAA0B,CAAC,CAAC,CACvD,CACF;SACA,QAAQ,EAAE;IAEb,8EAA8E;IAC9E,uCAAuC;IACvC,iDAAiD;IAEjD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAExC,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,KAAK,CAAC,gDAAgD,CAAC,CAAC,cAAc;SACtE,QAAQ,EAAE;IAEb,iEAAiE;IACjE,aAAa,EAAE,qBAAe,CAAC,QAAQ,EAAE;IAEzC,oCAAoC;IACpC,OAAO,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEtD;;;;;OAKG;IACH,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEzE,gDAAgD;IAChD,qBAAqB,EAAE,gEAA+B,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAA"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
/**
|
3
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc9396#section-2 | RFC 9396, Section 2}
|
4
|
+
*/
|
5
|
+
export declare const oauthAuthorizationDetailSchema: z.ZodObject<{
|
6
|
+
type: z.ZodString;
|
7
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
8
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
9
|
+
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
10
|
+
identifier: z.ZodOptional<z.ZodString>;
|
11
|
+
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
13
|
+
type: string;
|
14
|
+
locations?: string[] | undefined;
|
15
|
+
actions?: string[] | undefined;
|
16
|
+
datatypes?: string[] | undefined;
|
17
|
+
identifier?: string | undefined;
|
18
|
+
privileges?: string[] | undefined;
|
19
|
+
}, {
|
20
|
+
type: string;
|
21
|
+
locations?: string[] | undefined;
|
22
|
+
actions?: string[] | undefined;
|
23
|
+
datatypes?: string[] | undefined;
|
24
|
+
identifier?: string | undefined;
|
25
|
+
privileges?: string[] | undefined;
|
26
|
+
}>;
|
27
|
+
export type OAuthAuthorizationDetail = z.infer<typeof oauthAuthorizationDetailSchema>;
|
28
|
+
/**
|
29
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc9396#section-2 | RFC 9396, Section 2}
|
30
|
+
*/
|
31
|
+
export declare const oauthAuthorizationDetailsSchema: z.ZodArray<z.ZodObject<{
|
32
|
+
type: z.ZodString;
|
33
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
34
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
35
|
+
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
36
|
+
identifier: z.ZodOptional<z.ZodString>;
|
37
|
+
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
39
|
+
type: string;
|
40
|
+
locations?: string[] | undefined;
|
41
|
+
actions?: string[] | undefined;
|
42
|
+
datatypes?: string[] | undefined;
|
43
|
+
identifier?: string | undefined;
|
44
|
+
privileges?: string[] | undefined;
|
45
|
+
}, {
|
46
|
+
type: string;
|
47
|
+
locations?: string[] | undefined;
|
48
|
+
actions?: string[] | undefined;
|
49
|
+
datatypes?: string[] | undefined;
|
50
|
+
identifier?: string | undefined;
|
51
|
+
privileges?: string[] | undefined;
|
52
|
+
}>, "many">;
|
53
|
+
export type OAuthAuthorizationDetails = z.infer<typeof oauthAuthorizationDetailsSchema>;
|
54
|
+
//# sourceMappingURL=oauth-authorization-details.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-authorization-details.d.ts","sourceRoot":"","sources":["../src/oauth-authorization-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;EAOzC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;WAE3C,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.oauthAuthorizationDetailsSchema = exports.oauthAuthorizationDetailSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
/**
|
6
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc9396#section-2 | RFC 9396, Section 2}
|
7
|
+
*/
|
8
|
+
exports.oauthAuthorizationDetailSchema = zod_1.z.object({
|
9
|
+
type: zod_1.z.string(),
|
10
|
+
locations: zod_1.z.array(zod_1.z.string().url()).optional(),
|
11
|
+
actions: zod_1.z.array(zod_1.z.string()).optional(),
|
12
|
+
datatypes: zod_1.z.array(zod_1.z.string()).optional(),
|
13
|
+
identifier: zod_1.z.string().optional(),
|
14
|
+
privileges: zod_1.z.array(zod_1.z.string()).optional(),
|
15
|
+
});
|
16
|
+
/**
|
17
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc9396#section-2 | RFC 9396, Section 2}
|
18
|
+
*/
|
19
|
+
exports.oauthAuthorizationDetailsSchema = zod_1.z.array(exports.oauthAuthorizationDetailSchema);
|
20
|
+
//# sourceMappingURL=oauth-authorization-details.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-authorization-details.js","sourceRoot":"","sources":["../src/oauth-authorization-details.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB;;GAEG;AACU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AAMF;;GAEG;AACU,QAAA,+BAA+B,GAAG,OAAC,CAAC,KAAK,CACpD,sCAA8B,CAC/B,CAAA"}
|