@atproto/oauth-types 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- package/dist/atproto-loopback-client-metadata.d.ts +4 -1
- package/dist/atproto-loopback-client-metadata.d.ts.map +1 -1
- package/dist/atproto-loopback-client-metadata.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/oauth-authorization-code-grant-token-request.d.ts +2 -2
- package/dist/oauth-authorization-code-grant-token-request.d.ts.map +1 -1
- package/dist/oauth-authorization-code-grant-token-request.js +2 -1
- package/dist/oauth-authorization-code-grant-token-request.js.map +1 -1
- package/dist/oauth-authorization-details.d.ts +42 -4
- package/dist/oauth-authorization-details.d.ts.map +1 -1
- package/dist/oauth-authorization-details.js +21 -1
- package/dist/oauth-authorization-details.js.map +1 -1
- package/dist/oauth-authorization-request-jar.d.ts +1 -1
- package/dist/oauth-authorization-request-par.d.ts +8 -8
- package/dist/oauth-authorization-request-parameters.d.ts +7 -7
- package/dist/oauth-authorization-request-parameters.d.ts.map +1 -1
- package/dist/oauth-authorization-request-parameters.js +2 -1
- package/dist/oauth-authorization-request-parameters.js.map +1 -1
- package/dist/oauth-authorization-request-query.d.ts +8 -8
- package/dist/oauth-authorization-server-metadata.d.ts +69 -66
- package/dist/oauth-authorization-server-metadata.d.ts.map +1 -1
- package/dist/oauth-authorization-server-metadata.js +14 -10
- package/dist/oauth-authorization-server-metadata.js.map +1 -1
- package/dist/oauth-client-id-discoverable.d.ts +3 -2
- package/dist/oauth-client-id-discoverable.d.ts.map +1 -1
- package/dist/oauth-client-id-discoverable.js +52 -28
- package/dist/oauth-client-id-discoverable.js.map +1 -1
- package/dist/oauth-client-id-loopback.d.ts +5 -5
- package/dist/oauth-client-id-loopback.d.ts.map +1 -1
- package/dist/oauth-client-id-loopback.js +29 -27
- package/dist/oauth-client-id-loopback.js.map +1 -1
- package/dist/oauth-client-metadata.d.ts +22 -12
- package/dist/oauth-client-metadata.d.ts.map +1 -1
- package/dist/oauth-client-metadata.js +18 -8
- package/dist/oauth-client-metadata.js.map +1 -1
- package/dist/oauth-issuer-identifier.d.ts +1 -1
- package/dist/oauth-issuer-identifier.d.ts.map +1 -1
- package/dist/oauth-issuer-identifier.js +3 -19
- package/dist/oauth-issuer-identifier.js.map +1 -1
- package/dist/oauth-protected-resource-metadata.d.ts +15 -12
- package/dist/oauth-protected-resource-metadata.d.ts.map +1 -1
- package/dist/oauth-protected-resource-metadata.js +15 -5
- package/dist/oauth-protected-resource-metadata.js.map +1 -1
- package/dist/oauth-redirect-uri.d.ts +10 -0
- package/dist/oauth-redirect-uri.d.ts.map +1 -0
- package/dist/oauth-redirect-uri.js +35 -0
- package/dist/oauth-redirect-uri.js.map +1 -0
- package/dist/oauth-token-request.d.ts +2 -2
- package/dist/oauth-token-response.d.ts +6 -6
- package/dist/uri.d.ts +20 -0
- package/dist/uri.d.ts.map +1 -0
- package/dist/uri.js +127 -0
- package/dist/uri.js.map +1 -0
- package/package.json +1 -1
- package/src/atproto-loopback-client-metadata.ts +8 -3
- package/src/index.ts +2 -0
- package/src/oauth-authorization-code-grant-token-request.ts +2 -1
- package/src/oauth-authorization-details.ts +21 -1
- package/src/oauth-authorization-request-parameters.ts +2 -1
- package/src/oauth-authorization-server-metadata.ts +14 -10
- package/src/oauth-client-id-discoverable.ts +69 -51
- package/src/oauth-client-id-loopback.ts +40 -40
- package/src/oauth-client-metadata.ts +18 -8
- package/src/oauth-issuer-identifier.ts +6 -21
- package/src/oauth-protected-resource-metadata.ts +15 -5
- package/src/oauth-redirect-uri.ts +56 -0
- package/src/uri.ts +171 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# @atproto/oauth-types
|
2
2
|
|
3
|
+
## 0.2.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#3066](https://github.com/bluesky-social/atproto/pull/3066) [`5ddd51235`](https://github.com/bluesky-social/atproto/commit/5ddd51235c7e064bddcad2dd218df05d144d18d3) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add oauthClientIdLoopbackSchema and oauthClientIdDiscoverableSchema schemas
|
8
|
+
|
9
|
+
- [#3066](https://github.com/bluesky-social/atproto/pull/3066) [`5ddd51235`](https://github.com/bluesky-social/atproto/commit/5ddd51235c7e064bddcad2dd218df05d144d18d3) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Enforce use of http and https url where applicable
|
10
|
+
|
11
|
+
- [#3066](https://github.com/bluesky-social/atproto/pull/3066) [`5ddd51235`](https://github.com/bluesky-social/atproto/commit/5ddd51235c7e064bddcad2dd218df05d144d18d3) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Strong validation or redirect_uri
|
12
|
+
|
3
13
|
## 0.2.0
|
4
14
|
|
5
15
|
### Minor Changes
|
@@ -1,3 +1,6 @@
|
|
1
|
+
import { OAuthClientIdLoopback } from './oauth-client-id-loopback.js';
|
1
2
|
import { OAuthClientMetadataInput } from './oauth-client-metadata.js';
|
2
|
-
export declare function atprotoLoopbackClientMetadata(clientId: string): OAuthClientMetadataInput
|
3
|
+
export declare function atprotoLoopbackClientMetadata(clientId: string): OAuthClientMetadataInput & {
|
4
|
+
client_id: OAuthClientIdLoopback;
|
5
|
+
};
|
3
6
|
//# sourceMappingURL=atproto-loopback-client-metadata.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"atproto-loopback-client-metadata.d.ts","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"atproto-loopback-client-metadata.d.ts","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAEtB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,GACf,wBAAwB,GAAG;IAC5B,SAAS,EAAE,qBAAqB,CAAA;CACjC,CAiBA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"atproto-loopback-client-metadata.js","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"atproto-loopback-client-metadata.js","sourceRoot":"","sources":["../src/atproto-loopback-client-metadata.ts"],"names":[],"mappings":";;AAMA,sEAqBC;AA3BD,+EAGsC;AAGtC,SAAgB,6BAA6B,CAC3C,QAAgB;IAIhB,MAAM,EACJ,KAAK,GAAG,SAAS,EACjB,aAAa,GAAG,CAAC,mBAAmB,EAAE,eAAe,CAAC,GACvD,GAAG,IAAA,wDAA0B,EAAC,QAAQ,CAAC,CAAA;IAExC,OAAO;QACL,SAAS,EAAE,QAAiC;QAC5C,KAAK;QACL,aAAa;QACb,WAAW,EAAE,iBAAiB;QAC9B,cAAc,EAAE,CAAC,MAAM,CAAC;QACxB,WAAW,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QACpD,0BAA0B,EAAE,MAAM;QAClC,gBAAgB,EAAE,QAAQ;QAC1B,wBAAwB,EAAE,IAAI;KAC/B,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './constants.js';
|
2
|
+
export * from './uri.js';
|
2
3
|
export * from './util.js';
|
3
4
|
export * from './atproto-loopback-client-metadata.js';
|
4
5
|
export * from './oauth-access-token.js';
|
@@ -24,6 +25,7 @@ export * from './oauth-issuer-identifier.js';
|
|
24
25
|
export * from './oauth-par-response.js';
|
25
26
|
export * from './oauth-password-grant-token-request.js';
|
26
27
|
export * from './oauth-protected-resource-metadata.js';
|
28
|
+
export * from './oauth-redirect-uri.js';
|
27
29
|
export * from './oauth-refresh-token-grant-token-request.js';
|
28
30
|
export * from './oauth-refresh-token.js';
|
29
31
|
export * from './oauth-request-uri.js';
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +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,uCAAuC,CAAA;AACrD,cAAc,yBAAyB,CAAA;AACvC,cAAc,mDAAmD,CAAA;AACjE,cAAc,kCAAkC,CAAA;AAChD,cAAc,sCAAsC,CAAA;AACpD,cAAc,sCAAsC,CAAA;AACpD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA;AACxD,cAAc,mDAAmD,CAAA;AACjE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AACvD,cAAc,wCAAwC,CAAA;AACtD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,cAAc,uCAAuC,CAAA;AACrD,cAAc,yBAAyB,CAAA;AACvC,cAAc,mDAAmD,CAAA;AACjE,cAAc,kCAAkC,CAAA;AAChD,cAAc,sCAAsC,CAAA;AACpD,cAAc,sCAAsC,CAAA;AACpD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,wCAAwC,CAAA;AACtD,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA;AACxD,cAAc,mDAAmD,CAAA;AACjE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yCAAyC,CAAA;AACvD,cAAc,wCAAwC,CAAA;AACtD,cAAc,yBAAyB,CAAA;AACvC,cAAc,8CAA8C,CAAA;AAC5D,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,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
CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./constants.js"), exports);
|
18
|
+
__exportStar(require("./uri.js"), exports);
|
18
19
|
__exportStar(require("./util.js"), exports);
|
19
20
|
__exportStar(require("./atproto-loopback-client-metadata.js"), exports);
|
20
21
|
__exportStar(require("./oauth-access-token.js"), exports);
|
@@ -40,6 +41,7 @@ __exportStar(require("./oauth-issuer-identifier.js"), exports);
|
|
40
41
|
__exportStar(require("./oauth-par-response.js"), exports);
|
41
42
|
__exportStar(require("./oauth-password-grant-token-request.js"), exports);
|
42
43
|
__exportStar(require("./oauth-protected-resource-metadata.js"), exports);
|
44
|
+
__exportStar(require("./oauth-redirect-uri.js"), exports);
|
43
45
|
__exportStar(require("./oauth-refresh-token-grant-token-request.js"), exports);
|
44
46
|
__exportStar(require("./oauth-refresh-token.js"), exports);
|
45
47
|
__exportStar(require("./oauth-request-uri.js"), exports);
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,4CAAyB;AAEzB,wEAAqD;AACrD,0DAAuC;AACvC,oFAAiE;AACjE,mEAAgD;AAChD,uEAAoD;AACpD,uEAAoD;AACpD,8EAA2D;AAC3D,yEAAsD;AACtD,uEAAoD;AACpD,2EAAwD;AACxD,oFAAiE;AACjE,gEAA6C;AAC7C,oEAAiD;AACjD,gEAA6C;AAC7C,uDAAoC;AACpC,6DAA0C;AAC1C,kEAA+C;AAC/C,2DAAwC;AACxC,wDAAqC;AACrC,oEAAiD;AACjD,+DAA4C;AAC5C,0DAAuC;AACvC,0EAAuD;AACvD,yEAAsD;AACtD,+EAA4D;AAC5D,2DAAwC;AACxC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,mDAAgC;AAChC,kEAA+C;AAC/C,2DAAwC;AACxC,4DAAyC;AACzC,wDAAqC;AACrC,6DAA0C;AAC1C,8DAA2C;AAC3C,wDAAqC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,2CAAwB;AACxB,4CAAyB;AAEzB,wEAAqD;AACrD,0DAAuC;AACvC,oFAAiE;AACjE,mEAAgD;AAChD,uEAAoD;AACpD,uEAAoD;AACpD,8EAA2D;AAC3D,yEAAsD;AACtD,uEAAoD;AACpD,2EAAwD;AACxD,oFAAiE;AACjE,gEAA6C;AAC7C,oEAAiD;AACjD,gEAA6C;AAC7C,uDAAoC;AACpC,6DAA0C;AAC1C,kEAA+C;AAC/C,2DAAwC;AACxC,wDAAqC;AACrC,oEAAiD;AACjD,+DAA4C;AAC5C,0DAAuC;AACvC,0EAAuD;AACvD,yEAAsD;AACtD,0DAAuC;AACvC,+EAA4D;AAC5D,2DAAwC;AACxC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,mDAAgC;AAChC,kEAA+C;AAC/C,2DAAwC;AACxC,4DAAyC;AACzC,wDAAqC;AACrC,6DAA0C;AAC1C,8DAA2C;AAC3C,wDAAqC"}
|
@@ -2,12 +2,12 @@ import { z } from 'zod';
|
|
2
2
|
export declare const oauthAuthorizationCodeGrantTokenRequestSchema: z.ZodObject<{
|
3
3
|
grant_type: z.ZodLiteral<"authorization_code">;
|
4
4
|
code: z.ZodString;
|
5
|
-
redirect_uri: z.ZodString
|
5
|
+
redirect_uri: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `http://[::1]${string}` | "http://localhost" | `http://localhost#${string}` | `http://localhost?${string}` | `http://localhost/${string}` | `http://localhost:${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `https://${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `${string}.${string}:/${string}`, string>]>;
|
6
6
|
/** @see {@link https://datatracker.ietf.org/doc/html/rfc7636#section-4.1} */
|
7
7
|
code_verifier: z.ZodOptional<z.ZodString>;
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
9
9
|
code: string;
|
10
|
-
redirect_uri: string
|
10
|
+
redirect_uri: `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}` | `https://${string}` | `${string}.${string}:/${string}`;
|
11
11
|
grant_type: "authorization_code";
|
12
12
|
code_verifier?: string | undefined;
|
13
13
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-code-grant-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-authorization-code-grant-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"oauth-authorization-code-grant-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-authorization-code-grant-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,6CAA6C;;;;IAIxD,6EAA6E;;;;;;;;;;;;EAO7E,CAAA;AAEF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,6CAA6C,CACrD,CAAA"}
|
@@ -2,10 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.oauthAuthorizationCodeGrantTokenRequestSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const oauth_redirect_uri_js_1 = require("./oauth-redirect-uri.js");
|
5
6
|
exports.oauthAuthorizationCodeGrantTokenRequestSchema = zod_1.z.object({
|
6
7
|
grant_type: zod_1.z.literal('authorization_code'),
|
7
8
|
code: zod_1.z.string().min(1),
|
8
|
-
redirect_uri:
|
9
|
+
redirect_uri: oauth_redirect_uri_js_1.oauthRedirectUriSchema,
|
9
10
|
/** @see {@link https://datatracker.ietf.org/doc/html/rfc7636#section-4.1} */
|
10
11
|
code_verifier: zod_1.z
|
11
12
|
.string()
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-code-grant-token-request.js","sourceRoot":"","sources":["../src/oauth-authorization-code-grant-token-request.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;
|
1
|
+
{"version":3,"file":"oauth-authorization-code-grant-token-request.js","sourceRoot":"","sources":["../src/oauth-authorization-code-grant-token-request.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mEAAgE;AAEnD,QAAA,6CAA6C,GAAG,OAAC,CAAC,MAAM,CAAC;IACpE,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAC3C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,YAAY,EAAE,8CAAsB;IACpC,6EAA6E;IAC7E,aAAa,EAAE,OAAC;SACb,MAAM,EAAE;SACR,GAAG,CAAC,EAAE,CAAC;SACP,GAAG,CAAC,GAAG,CAAC;SACR,KAAK,CAAC,oBAAoB,CAAC;SAC3B,QAAQ,EAAE;CACd,CAAC,CAAA"}
|
@@ -4,14 +4,33 @@ import { z } from 'zod';
|
|
4
4
|
*/
|
5
5
|
export declare const oauthAuthorizationDetailSchema: z.ZodObject<{
|
6
6
|
type: z.ZodString;
|
7
|
-
|
7
|
+
/**
|
8
|
+
* An array of strings representing the location of the resource or RS. These
|
9
|
+
* strings are typically URIs identifying the location of the RS.
|
10
|
+
*/
|
11
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
12
|
+
/**
|
13
|
+
* An array of strings representing the kinds of actions to be taken at the
|
14
|
+
* resource.
|
15
|
+
*/
|
8
16
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
17
|
+
/**
|
18
|
+
* An array of strings representing the kinds of data being requested from the
|
19
|
+
* resource.
|
20
|
+
*/
|
9
21
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
22
|
+
/**
|
23
|
+
* A string identifier indicating a specific resource available at the API.
|
24
|
+
*/
|
10
25
|
identifier: z.ZodOptional<z.ZodString>;
|
26
|
+
/**
|
27
|
+
* An array of strings representing the types or levels of privilege being
|
28
|
+
* requested at the resource.
|
29
|
+
*/
|
11
30
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
12
31
|
}, "strip", z.ZodTypeAny, {
|
13
32
|
type: string;
|
14
|
-
locations?: string[] | undefined;
|
33
|
+
locations?: `${string}:${string}`[] | undefined;
|
15
34
|
actions?: string[] | undefined;
|
16
35
|
datatypes?: string[] | undefined;
|
17
36
|
identifier?: string | undefined;
|
@@ -30,14 +49,33 @@ export type OAuthAuthorizationDetail = z.infer<typeof oauthAuthorizationDetailSc
|
|
30
49
|
*/
|
31
50
|
export declare const oauthAuthorizationDetailsSchema: z.ZodArray<z.ZodObject<{
|
32
51
|
type: z.ZodString;
|
33
|
-
|
52
|
+
/**
|
53
|
+
* An array of strings representing the location of the resource or RS. These
|
54
|
+
* strings are typically URIs identifying the location of the RS.
|
55
|
+
*/
|
56
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
57
|
+
/**
|
58
|
+
* An array of strings representing the kinds of actions to be taken at the
|
59
|
+
* resource.
|
60
|
+
*/
|
34
61
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
62
|
+
/**
|
63
|
+
* An array of strings representing the kinds of data being requested from the
|
64
|
+
* resource.
|
65
|
+
*/
|
35
66
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
67
|
+
/**
|
68
|
+
* A string identifier indicating a specific resource available at the API.
|
69
|
+
*/
|
36
70
|
identifier: z.ZodOptional<z.ZodString>;
|
71
|
+
/**
|
72
|
+
* An array of strings representing the types or levels of privilege being
|
73
|
+
* requested at the resource.
|
74
|
+
*/
|
37
75
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
38
76
|
}, "strip", z.ZodTypeAny, {
|
39
77
|
type: string;
|
40
|
-
locations?: string[] | undefined;
|
78
|
+
locations?: `${string}:${string}`[] | undefined;
|
41
79
|
actions?: string[] | undefined;
|
42
80
|
datatypes?: string[] | undefined;
|
43
81
|
identifier?: string | undefined;
|
@@ -1 +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;
|
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;AAGvB;;GAEG;AACH,eAAO,MAAM,8BAA8B;;IAEzC;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,+BAA+B;;IAjC1C;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;WAaJ,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA"}
|
@@ -2,15 +2,35 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.oauthAuthorizationDetailsSchema = exports.oauthAuthorizationDetailSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const uri_js_1 = require("./uri.js");
|
5
6
|
/**
|
6
7
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc9396#section-2 | RFC 9396, Section 2}
|
7
8
|
*/
|
8
9
|
exports.oauthAuthorizationDetailSchema = zod_1.z.object({
|
9
10
|
type: zod_1.z.string(),
|
10
|
-
|
11
|
+
/**
|
12
|
+
* An array of strings representing the location of the resource or RS. These
|
13
|
+
* strings are typically URIs identifying the location of the RS.
|
14
|
+
*/
|
15
|
+
locations: zod_1.z.array(uri_js_1.dangerousUriSchema).optional(),
|
16
|
+
/**
|
17
|
+
* An array of strings representing the kinds of actions to be taken at the
|
18
|
+
* resource.
|
19
|
+
*/
|
11
20
|
actions: zod_1.z.array(zod_1.z.string()).optional(),
|
21
|
+
/**
|
22
|
+
* An array of strings representing the kinds of data being requested from the
|
23
|
+
* resource.
|
24
|
+
*/
|
12
25
|
datatypes: zod_1.z.array(zod_1.z.string()).optional(),
|
26
|
+
/**
|
27
|
+
* A string identifier indicating a specific resource available at the API.
|
28
|
+
*/
|
13
29
|
identifier: zod_1.z.string().optional(),
|
30
|
+
/**
|
31
|
+
* An array of strings representing the types or levels of privilege being
|
32
|
+
* requested at the resource.
|
33
|
+
*/
|
14
34
|
privileges: zod_1.z.array(zod_1.z.string()).optional(),
|
15
35
|
});
|
16
36
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-details.js","sourceRoot":"","sources":["../src/oauth-authorization-details.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;
|
1
|
+
{"version":3,"file":"oauth-authorization-details.js","sourceRoot":"","sources":["../src/oauth-authorization-details.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,qCAA6C;AAE7C;;GAEG;AACU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB;;;OAGG;IACH,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAkB,CAAC,CAAC,QAAQ,EAAE;IACjD;;;OAGG;IACH,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC;;;OAGG;IACH,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC;;OAEG;IACH,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC;;;OAGG;IACH,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"}
|
@@ -8,7 +8,7 @@ export declare const oauthAuthorizationRequestJarSchema: z.ZodObject<{
|
|
8
8
|
*/
|
9
9
|
request: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}`, string>]>;
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
11
|
-
request: `${string}.${string}
|
11
|
+
request: `${string}.${string}` | `${string}.${string}.${string}`;
|
12
12
|
}, {
|
13
13
|
request: string;
|
14
14
|
}>;
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject<{
|
3
3
|
client_id: z.ZodString;
|
4
4
|
state: z.ZodOptional<z.ZodString>;
|
5
|
-
redirect_uri: z.ZodOptional<z.ZodString
|
5
|
+
redirect_uri: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `http://[::1]${string}` | "http://localhost" | `http://localhost#${string}` | `http://localhost?${string}` | `http://localhost/${string}` | `http://localhost:${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `https://${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `${string}.${string}:/${string}`, string>]>>;
|
6
6
|
scope: z.ZodOptional<z.ZodString>;
|
7
7
|
response_type: z.ZodEnum<["code", "token", "none", "code id_token token", "code id_token", "code token", "id_token token", "id_token"]>;
|
8
8
|
code_challenge: z.ZodOptional<z.ZodString>;
|
@@ -31,14 +31,14 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
31
31
|
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
32
32
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
33
33
|
type: z.ZodString;
|
34
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
34
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
35
35
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
36
36
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
37
37
|
identifier: z.ZodOptional<z.ZodString>;
|
38
38
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
40
40
|
type: string;
|
41
|
-
locations?: string[] | undefined;
|
41
|
+
locations?: `${string}:${string}`[] | undefined;
|
42
42
|
actions?: string[] | undefined;
|
43
43
|
datatypes?: string[] | undefined;
|
44
44
|
identifier?: string | undefined;
|
@@ -54,7 +54,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
55
55
|
client_id: string;
|
56
56
|
response_type: "code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token";
|
57
|
-
redirect_uri?: string | undefined;
|
57
|
+
redirect_uri?: `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}` | `https://${string}` | `${string}.${string}:/${string}` | undefined;
|
58
58
|
scope?: string | undefined;
|
59
59
|
nonce?: string | undefined;
|
60
60
|
state?: string | undefined;
|
@@ -63,7 +63,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
63
63
|
dpop_jkt?: string | undefined;
|
64
64
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
65
65
|
max_age?: number | undefined;
|
66
|
-
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" | "
|
66
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
67
67
|
values?: (string | number | boolean)[] | undefined;
|
68
68
|
value?: string | number | boolean | undefined;
|
69
69
|
essential?: boolean | undefined;
|
@@ -75,7 +75,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
75
75
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
76
76
|
authorization_details?: {
|
77
77
|
type: string;
|
78
|
-
locations?: string[] | undefined;
|
78
|
+
locations?: `${string}:${string}`[] | undefined;
|
79
79
|
actions?: string[] | undefined;
|
80
80
|
datatypes?: string[] | undefined;
|
81
81
|
identifier?: string | undefined;
|
@@ -93,7 +93,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
93
93
|
dpop_jkt?: string | undefined;
|
94
94
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
95
95
|
max_age?: number | undefined;
|
96
|
-
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" | "
|
96
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
97
97
|
values?: (string | number | boolean)[] | undefined;
|
98
98
|
value?: string | number | boolean | undefined;
|
99
99
|
essential?: boolean | undefined;
|
@@ -114,7 +114,7 @@ export declare const oauthAuthorizationRequestParSchema: z.ZodUnion<[z.ZodObject
|
|
114
114
|
}>, z.ZodObject<{
|
115
115
|
request: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}`, string>]>;
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
117
|
-
request: `${string}.${string}
|
117
|
+
request: `${string}.${string}` | `${string}.${string}.${string}`;
|
118
118
|
}, {
|
119
119
|
request: string;
|
120
120
|
}>]>;
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
5
5
|
export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
6
6
|
client_id: z.ZodString;
|
7
7
|
state: z.ZodOptional<z.ZodString>;
|
8
|
-
redirect_uri: z.ZodOptional<z.ZodString
|
8
|
+
redirect_uri: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `http://[::1]${string}` | "http://localhost" | `http://localhost#${string}` | `http://localhost?${string}` | `http://localhost/${string}` | `http://localhost:${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `https://${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `${string}.${string}:/${string}`, string>]>>;
|
9
9
|
scope: z.ZodOptional<z.ZodString>;
|
10
10
|
response_type: z.ZodEnum<["code", "token", "none", "code id_token token", "code id_token", "code token", "id_token token", "id_token"]>;
|
11
11
|
code_challenge: z.ZodOptional<z.ZodString>;
|
@@ -40,14 +40,14 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
40
40
|
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
41
41
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
42
42
|
type: z.ZodString;
|
43
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
43
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
44
44
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
45
45
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
46
46
|
identifier: z.ZodOptional<z.ZodString>;
|
47
47
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
48
48
|
}, "strip", z.ZodTypeAny, {
|
49
49
|
type: string;
|
50
|
-
locations?: string[] | undefined;
|
50
|
+
locations?: `${string}:${string}`[] | undefined;
|
51
51
|
actions?: string[] | undefined;
|
52
52
|
datatypes?: string[] | undefined;
|
53
53
|
identifier?: string | undefined;
|
@@ -63,7 +63,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
64
64
|
client_id: string;
|
65
65
|
response_type: "code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token";
|
66
|
-
redirect_uri?: string | undefined;
|
66
|
+
redirect_uri?: `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}` | `https://${string}` | `${string}.${string}:/${string}` | undefined;
|
67
67
|
scope?: string | undefined;
|
68
68
|
nonce?: string | undefined;
|
69
69
|
state?: string | undefined;
|
@@ -72,7 +72,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
72
72
|
dpop_jkt?: string | undefined;
|
73
73
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
74
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" | "
|
75
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
76
76
|
values?: (string | number | boolean)[] | undefined;
|
77
77
|
value?: string | number | boolean | undefined;
|
78
78
|
essential?: boolean | undefined;
|
@@ -84,7 +84,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
84
84
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
85
85
|
authorization_details?: {
|
86
86
|
type: string;
|
87
|
-
locations?: string[] | undefined;
|
87
|
+
locations?: `${string}:${string}`[] | undefined;
|
88
88
|
actions?: string[] | undefined;
|
89
89
|
datatypes?: string[] | undefined;
|
90
90
|
identifier?: string | undefined;
|
@@ -102,7 +102,7 @@ export declare const oauthAuthorizationRequestParametersSchema: z.ZodObject<{
|
|
102
102
|
dpop_jkt?: string | undefined;
|
103
103
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
104
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" | "
|
105
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
106
106
|
values?: (string | number | boolean)[] | undefined;
|
107
107
|
value?: string | number | boolean | undefined;
|
108
108
|
essential?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-request-parameters.d.ts","sourceRoot":"","sources":["../src/oauth-authorization-request-parameters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"oauth-authorization-request-parameters.d.ts","sourceRoot":"","sources":["../src/oauth-authorization-request-parameters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB;;GAEG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8DpD;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKH,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAA"}
|
@@ -6,6 +6,7 @@ const zod_1 = require("zod");
|
|
6
6
|
const oauth_authorization_details_js_1 = require("./oauth-authorization-details.js");
|
7
7
|
const oauth_client_id_js_1 = require("./oauth-client-id.js");
|
8
8
|
const oauth_code_challenge_method_js_1 = require("./oauth-code-challenge-method.js");
|
9
|
+
const oauth_redirect_uri_js_1 = require("./oauth-redirect-uri.js");
|
9
10
|
const oauth_response_type_js_1 = require("./oauth-response-type.js");
|
10
11
|
const oauth_scope_js_1 = require("./oauth-scope.js");
|
11
12
|
const oidc_claims_parameter_js_1 = require("./oidc-claims-parameter.js");
|
@@ -17,7 +18,7 @@ const oidc_entity_type_js_1 = require("./oidc-entity-type.js");
|
|
17
18
|
exports.oauthAuthorizationRequestParametersSchema = zod_1.z.object({
|
18
19
|
client_id: oauth_client_id_js_1.oauthClientIdSchema,
|
19
20
|
state: zod_1.z.string().optional(),
|
20
|
-
redirect_uri:
|
21
|
+
redirect_uri: oauth_redirect_uri_js_1.oauthRedirectUriSchema.optional(),
|
21
22
|
scope: oauth_scope_js_1.oauthScopeSchema.optional(),
|
22
23
|
response_type: oauth_response_type_js_1.oauthResponseTypeSchema,
|
23
24
|
// PKCE
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-authorization-request-parameters.js","sourceRoot":"","sources":["../src/oauth-authorization-request-parameters.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,6DAA0D;AAC1D,qFAAiF;AACjF,qEAAkE;AAClE,qDAAmD;AACnD,yEAAsE;AACtE,2EAAwE;AACxE,+DAA4D;AAE5D;;GAEG;AACU,QAAA,yCAAyC,GAAG,OAAC,CAAC,MAAM,CAAC;IAChE,SAAS,EAAE,wCAAmB;IAC9B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,
|
1
|
+
{"version":3,"file":"oauth-authorization-request-parameters.js","sourceRoot":"","sources":["../src/oauth-authorization-request-parameters.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,6DAA0D;AAC1D,qFAAiF;AACjF,mEAAgE;AAChE,qEAAkE;AAClE,qDAAmD;AACnD,yEAAsE;AACtE,2EAAwE;AACxE,+DAA4D;AAE5D;;GAEG;AACU,QAAA,yCAAyC,GAAG,OAAC,CAAC,MAAM,CAAC;IAChE,SAAS,EAAE,wCAAmB;IAC9B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,8CAAsB,CAAC,QAAQ,EAAE;IAC/C,KAAK,EAAE,iCAAgB,CAAC,QAAQ,EAAE;IAClC,aAAa,EAAE,gDAAuB;IAEtC,OAAO;IAEP,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,qBAAqB,EAAE,+DAA8B;SAClD,OAAO,CAAC,MAAM,CAAC;SACf,QAAQ,EAAE;IAEb,OAAO;IAEP,6DAA6D;IAC7D,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE/B,OAAO;IAEP,kCAAkC;IAClC,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEpE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE5B,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,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE7D;;;;;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"}
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObject<{
|
3
3
|
client_id: z.ZodString;
|
4
4
|
state: z.ZodOptional<z.ZodString>;
|
5
|
-
redirect_uri: z.ZodOptional<z.ZodString
|
5
|
+
redirect_uri: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `http://[::1]${string}` | "http://localhost" | `http://localhost#${string}` | `http://localhost?${string}` | `http://localhost/${string}` | `http://localhost:${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `https://${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `${string}.${string}:/${string}`, string>]>>;
|
6
6
|
scope: z.ZodOptional<z.ZodString>;
|
7
7
|
response_type: z.ZodEnum<["code", "token", "none", "code id_token token", "code id_token", "code token", "id_token token", "id_token"]>;
|
8
8
|
code_challenge: z.ZodOptional<z.ZodString>;
|
@@ -31,14 +31,14 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
31
31
|
prompt: z.ZodOptional<z.ZodEnum<["none", "login", "consent", "select_account"]>>;
|
32
32
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
33
33
|
type: z.ZodString;
|
34
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
34
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
35
35
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
36
36
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
37
37
|
identifier: z.ZodOptional<z.ZodString>;
|
38
38
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
40
40
|
type: string;
|
41
|
-
locations?: string[] | undefined;
|
41
|
+
locations?: `${string}:${string}`[] | undefined;
|
42
42
|
actions?: string[] | undefined;
|
43
43
|
datatypes?: string[] | undefined;
|
44
44
|
identifier?: string | undefined;
|
@@ -54,7 +54,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
55
55
|
client_id: string;
|
56
56
|
response_type: "code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token";
|
57
|
-
redirect_uri?: string | undefined;
|
57
|
+
redirect_uri?: `http://[::1]${string}` | "http://127.0.0.1" | `http://127.0.0.1#${string}` | `http://127.0.0.1?${string}` | `http://127.0.0.1/${string}` | `http://127.0.0.1:${string}` | `https://${string}` | `${string}.${string}:/${string}` | undefined;
|
58
58
|
scope?: string | undefined;
|
59
59
|
nonce?: string | undefined;
|
60
60
|
state?: string | undefined;
|
@@ -63,7 +63,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
63
63
|
dpop_jkt?: string | undefined;
|
64
64
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
65
65
|
max_age?: number | undefined;
|
66
|
-
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" | "
|
66
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
67
67
|
values?: (string | number | boolean)[] | undefined;
|
68
68
|
value?: string | number | boolean | undefined;
|
69
69
|
essential?: boolean | undefined;
|
@@ -75,7 +75,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
75
75
|
prompt?: "none" | "login" | "consent" | "select_account" | undefined;
|
76
76
|
authorization_details?: {
|
77
77
|
type: string;
|
78
|
-
locations?: string[] | undefined;
|
78
|
+
locations?: `${string}:${string}`[] | undefined;
|
79
79
|
actions?: string[] | undefined;
|
80
80
|
datatypes?: string[] | undefined;
|
81
81
|
identifier?: string | undefined;
|
@@ -93,7 +93,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
93
93
|
dpop_jkt?: string | undefined;
|
94
94
|
response_mode?: "query" | "fragment" | "form_post" | undefined;
|
95
95
|
max_age?: number | undefined;
|
96
|
-
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" | "
|
96
|
+
claims?: Partial<Record<"id_token" | "userinfo", Partial<Record<"email" | "auth_time" | "nonce" | "acr" | "name" | "family_name" | "given_name" | "middle_name" | "nickname" | "preferred_username" | "gender" | "picture" | "profile" | "website" | "birthdate" | "zoneinfo" | "locale" | "updated_at" | "email_verified" | "phone_number" | "phone_number_verified" | "address", {
|
97
97
|
values?: (string | number | boolean)[] | undefined;
|
98
98
|
value?: string | number | boolean | undefined;
|
99
99
|
essential?: boolean | undefined;
|
@@ -114,7 +114,7 @@ export declare const oauthAuthorizationRequestQuerySchema: z.ZodUnion<[z.ZodObje
|
|
114
114
|
}>, z.ZodObject<{
|
115
115
|
request: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>, z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}`, string>]>;
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
117
|
-
request: `${string}.${string}
|
117
|
+
request: `${string}.${string}` | `${string}.${string}.${string}`;
|
118
118
|
}, {
|
119
119
|
request: string;
|
120
120
|
}>, z.ZodObject<{
|