@atproto/oauth-types 0.1.5 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +28 -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 +1 -2
- package/dist/atproto-loopback-client-metadata.js.map +1 -1
- package/dist/constants.d.ts +0 -6
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -17
- package/dist/constants.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 +11 -11
- package/dist/oauth-authorization-request-parameters.d.ts +10 -10
- package/dist/oauth-authorization-request-parameters.d.ts.map +1 -1
- package/dist/oauth-authorization-request-parameters.js +3 -2
- package/dist/oauth-authorization-request-parameters.js.map +1 -1
- package/dist/oauth-authorization-request-query.d.ts +11 -11
- 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 +54 -31
- 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 +32 -31
- package/dist/oauth-client-id-loopback.js.map +1 -1
- package/dist/oauth-client-metadata.d.ts +112 -102
- 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 +2 -1
- package/dist/oauth-issuer-identifier.d.ts.map +1 -1
- package/dist/oauth-issuer-identifier.js +8 -23
- 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-refresh-token-grant-token-request.d.ts +0 -3
- package/dist/oauth-refresh-token-grant-token-request.d.ts.map +1 -1
- package/dist/oauth-refresh-token-grant-token-request.js +0 -2
- package/dist/oauth-refresh-token-grant-token-request.js.map +1 -1
- package/dist/oauth-token-request.d.ts +2 -5
- package/dist/oauth-token-request.d.ts.map +1 -1
- package/dist/oauth-token-response.d.ts +9 -12
- package/dist/oauth-token-response.d.ts.map +1 -1
- package/dist/oauth-token-response.js +4 -2
- package/dist/oauth-token-response.js.map +1 -1
- 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/dist/util.js +5 -6
- package/dist/util.js.map +1 -1
- package/package.json +2 -2
- package/src/atproto-loopback-client-metadata.ts +8 -3
- package/src/constants.ts +0 -16
- 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 +3 -2
- 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 +14 -24
- package/src/oauth-protected-resource-metadata.ts +15 -5
- package/src/oauth-redirect-uri.ts +56 -0
- package/src/oauth-refresh-token-grant-token-request.ts +0 -2
- package/src/oauth-token-response.ts +4 -2
- package/src/uri.ts +171 -0
- package/tsconfig.build.tsbuildinfo +1 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-client-metadata.d.ts","sourceRoot":"","sources":["../src/oauth-client-metadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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client_id_js_1 = require("./oauth-client-id.js");
|
7
7
|
const oauth_endpoint_auth_method_js_1 = require("./oauth-endpoint-auth-method.js");
|
8
8
|
const oauth_grant_type_js_1 = require("./oauth-grant-type.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
|
-
|
12
|
+
const uri_js_1 = require("./uri.js");
|
13
|
+
/**
|
14
|
+
* @see {@link https://openid.net/specs/openid-connect-registration-1_0.html}
|
15
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc7591}
|
16
|
+
* @note we do not enforce https: scheme in URIs to support development
|
17
|
+
* environments. Make sure to validate the URIs before using it in a production
|
18
|
+
* environment.
|
19
|
+
*/
|
13
20
|
exports.oauthClientMetadataSchema = zod_1.z.object({
|
14
|
-
|
21
|
+
/**
|
22
|
+
* @note redirect_uris require additional validation
|
23
|
+
*/
|
24
|
+
redirect_uris: zod_1.z.array(oauth_redirect_uri_js_1.oauthRedirectUriSchema).nonempty(),
|
15
25
|
response_types: zod_1.z
|
16
26
|
.array(oauth_response_type_js_1.oauthResponseTypeSchema)
|
17
27
|
.nonempty()
|
@@ -31,7 +41,7 @@ exports.oauthClientMetadataSchema = zod_1.z.object({
|
|
31
41
|
token_endpoint_auth_signing_alg: zod_1.z.string().optional(),
|
32
42
|
userinfo_signed_response_alg: zod_1.z.string().optional(),
|
33
43
|
userinfo_encrypted_response_alg: zod_1.z.string().optional(),
|
34
|
-
jwks_uri:
|
44
|
+
jwks_uri: uri_js_1.webUriSchema.optional(),
|
35
45
|
jwks: jwk_1.jwksPubSchema.optional(),
|
36
46
|
application_type: zod_1.z.enum(['web', 'native']).default('web').optional(), // default, per spec, is "web"
|
37
47
|
subject_type: zod_1.z.enum(['public', 'pairwise']).default('public').optional(),
|
@@ -42,10 +52,10 @@ exports.oauthClientMetadataSchema = zod_1.z.object({
|
|
42
52
|
authorization_encrypted_response_alg: zod_1.z.string().optional(),
|
43
53
|
client_id: oauth_client_id_js_1.oauthClientIdSchema.optional(),
|
44
54
|
client_name: zod_1.z.string().optional(),
|
45
|
-
client_uri:
|
46
|
-
policy_uri:
|
47
|
-
tos_uri:
|
48
|
-
logo_uri:
|
55
|
+
client_uri: uri_js_1.webUriSchema.optional(),
|
56
|
+
policy_uri: uri_js_1.webUriSchema.optional(),
|
57
|
+
tos_uri: uri_js_1.webUriSchema.optional(),
|
58
|
+
logo_uri: uri_js_1.webUriSchema.optional(), // TODO: allow data: uri ?
|
49
59
|
/**
|
50
60
|
* Default Maximum Authentication Age. Specifies that the End-User MUST be
|
51
61
|
* actively authenticated if the End-User was authenticated longer ago than
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-client-metadata.js","sourceRoot":"","sources":["../src/oauth-client-metadata.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,6BAAuB;AAEvB,6DAA0D;AAC1D,mFAAyE;AACzE,+DAA4D;AAC5D,qEAAkE;AAClE,qDAAmD;
|
1
|
+
{"version":3,"file":"oauth-client-metadata.js","sourceRoot":"","sources":["../src/oauth-client-metadata.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,6BAAuB;AAEvB,6DAA0D;AAC1D,mFAAyE;AACzE,+DAA4D;AAC5D,mEAAgE;AAChE,qEAAkE;AAClE,qDAAmD;AACnD,qCAAuC;AAEvC;;;;;;GAMG;AACU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD;;OAEG;IACH,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,8CAAsB,CAAC,CAAC,QAAQ,EAAE;IACzD,cAAc,EAAE,OAAC;SACd,KAAK,CAAC,gDAAuB,CAAC;SAC9B,QAAQ,EAAE;QACX,wEAAwE;QACxE,mBAAmB;SAClB,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACpB,WAAW,EAAE,OAAC;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WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,qBAAY,CAAC,QAAQ,EAAE;IACnC,UAAU,EAAE,qBAAY,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,qBAAY,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,qBAAY,CAAC,QAAQ,EAAE,EAAE,0BAA0B;IAE7D;;;;;;OAMG;IACH,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChD,0CAA0C,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAElE,4DAA4D;IAC5D,wBAAwB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAEhD,6DAA6D;IAC7D,2BAA2B,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAA"}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const oauthIssuerIdentifierSchema: z.ZodEffects<z.ZodString, string
|
2
|
+
export declare const oauthIssuerIdentifierSchema: z.ZodEffects<z.ZodEffects<z.ZodString, `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}` | `https://${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}` | `https://${string}`, string>;
|
3
|
+
export type OAuthIssuerIdentifier = z.infer<typeof oauthIssuerIdentifierSchema>;
|
3
4
|
//# sourceMappingURL=oauth-issuer-identifier.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-issuer-identifier.d.ts","sourceRoot":"","sources":["../src/oauth-issuer-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"oauth-issuer-identifier.d.ts","sourceRoot":"","sources":["../src/oauth-issuer-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,2BAA2B,2tBAyCvC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
@@ -2,47 +2,30 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.oauthIssuerIdentifierSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const
|
6
|
-
|
7
|
-
exports.oauthIssuerIdentifierSchema = zod_1.z
|
8
|
-
.string()
|
9
|
-
.superRefine((value, ctx) => {
|
5
|
+
const uri_js_1 = require("./uri.js");
|
6
|
+
exports.oauthIssuerIdentifierSchema = uri_js_1.webUriSchema.superRefine((value, ctx) => {
|
10
7
|
// Validate the issuer (MIX-UP attacks)
|
11
8
|
if (value.endsWith('/')) {
|
12
9
|
ctx.addIssue({
|
13
10
|
code: zod_1.z.ZodIssueCode.custom,
|
14
11
|
message: 'Issuer URL must not end with a slash',
|
15
12
|
});
|
13
|
+
return false;
|
16
14
|
}
|
17
|
-
const url =
|
18
|
-
if (!url) {
|
19
|
-
return ctx.addIssue({
|
20
|
-
code: zod_1.z.ZodIssueCode.custom,
|
21
|
-
message: 'Invalid url',
|
22
|
-
});
|
23
|
-
}
|
24
|
-
if (url.protocol !== 'https:') {
|
25
|
-
if (constants_js_1.ALLOW_UNSECURE_ORIGINS && url.protocol === 'http:') {
|
26
|
-
// We'll allow HTTP in development mode
|
27
|
-
}
|
28
|
-
else {
|
29
|
-
ctx.addIssue({
|
30
|
-
code: zod_1.z.ZodIssueCode.custom,
|
31
|
-
message: 'Issuer must be an HTTPS URL',
|
32
|
-
});
|
33
|
-
}
|
34
|
-
}
|
15
|
+
const url = new URL(value);
|
35
16
|
if (url.username || url.password) {
|
36
17
|
ctx.addIssue({
|
37
18
|
code: zod_1.z.ZodIssueCode.custom,
|
38
19
|
message: 'Issuer URL must not contain a username or password',
|
39
20
|
});
|
21
|
+
return false;
|
40
22
|
}
|
41
23
|
if (url.hash || url.search) {
|
42
24
|
ctx.addIssue({
|
43
25
|
code: zod_1.z.ZodIssueCode.custom,
|
44
26
|
message: 'Issuer URL must not contain a query or fragment',
|
45
27
|
});
|
28
|
+
return false;
|
46
29
|
}
|
47
30
|
const canonicalValue = url.pathname === '/' ? url.origin : url.href;
|
48
31
|
if (value !== canonicalValue) {
|
@@ -50,6 +33,8 @@ exports.oauthIssuerIdentifierSchema = zod_1.z
|
|
50
33
|
code: zod_1.z.ZodIssueCode.custom,
|
51
34
|
message: 'Issuer URL must be in the canonical form',
|
52
35
|
});
|
36
|
+
return false;
|
53
37
|
}
|
38
|
+
return true;
|
54
39
|
});
|
55
40
|
//# sourceMappingURL=oauth-issuer-identifier.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-issuer-identifier.js","sourceRoot":"","sources":["../src/oauth-issuer-identifier.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,
|
1
|
+
{"version":3,"file":"oauth-issuer-identifier.js","sourceRoot":"","sources":["../src/oauth-issuer-identifier.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,qCAAuC;AAE1B,QAAA,2BAA2B,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MetadataSchema: z.ZodObject<{
|
|
7
7
|
* REQUIRED. The protected resource's resource identifier, which is a URL that
|
8
8
|
* uses the https scheme and has no query or fragment components. Using these
|
9
9
|
* well-known resources is described in Section 3.
|
10
|
+
*
|
11
|
+
* @note This schema allows non https URLs for testing & development purposes.
|
12
|
+
* Make sure to validate the URL before using it in a production environment.
|
10
13
|
*/
|
11
|
-
resource: z.ZodString
|
14
|
+
resource: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `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}` | `https://${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}` | `https://${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}` | `https://${string}`, string>;
|
12
15
|
/**
|
13
16
|
* OPTIONAL. JSON array containing a list of OAuth authorization server issuer
|
14
17
|
* identifiers, as defined in [RFC8414], for authorization servers that can be
|
@@ -17,7 +20,7 @@ export declare const oauthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
17
20
|
* used. In some use cases, the set of authorization servers will not be
|
18
21
|
* enumerable, in which case this metadata parameter would not be used.
|
19
22
|
*/
|
20
|
-
authorization_servers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string
|
23
|
+
authorization_servers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, `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}` | `https://${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}` | `https://${string}`, string>, "many">>;
|
21
24
|
/**
|
22
25
|
* OPTIONAL. URL of the protected resource's JWK Set [JWK] document. This
|
23
26
|
* contains public keys belonging to the protected resource, such as signing
|
@@ -26,7 +29,7 @@ export declare const oauthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
26
29
|
* available, a use (public key use) parameter value is REQUIRED for all keys
|
27
30
|
* in the referenced JWK Set to indicate each key's intended usage.
|
28
31
|
*/
|
29
|
-
jwks_uri: z.ZodOptional<z.ZodString
|
32
|
+
jwks_uri: z.ZodOptional<z.ZodEffects<z.ZodString, `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}` | `https://${string}`, string>>;
|
30
33
|
/**
|
31
34
|
* RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope
|
32
35
|
* values that are used in authorization requests to request access to this
|
@@ -53,28 +56,28 @@ export declare const oauthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
53
56
|
* OPTIONAL. URL of a page containing human-readable information that
|
54
57
|
* developers might want or need to know when using the protected resource
|
55
58
|
*/
|
56
|
-
resource_documentation: z.ZodOptional<z.ZodString
|
59
|
+
resource_documentation: z.ZodOptional<z.ZodEffects<z.ZodString, `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}` | `https://${string}`, string>>;
|
57
60
|
/**
|
58
61
|
* OPTIONAL. URL that the protected resource provides to read about the
|
59
62
|
* protected resource's requirements on how the client can use the data
|
60
63
|
* provided by the protected resource
|
61
64
|
*/
|
62
|
-
resource_policy_uri: z.ZodOptional<z.ZodString
|
65
|
+
resource_policy_uri: z.ZodOptional<z.ZodEffects<z.ZodString, `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}` | `https://${string}`, string>>;
|
63
66
|
/**
|
64
67
|
* OPTIONAL. URL that the protected resource provides to read about the
|
65
68
|
* protected resource's terms of service
|
66
69
|
*/
|
67
|
-
resource_tos_uri: z.ZodOptional<z.ZodString
|
70
|
+
resource_tos_uri: z.ZodOptional<z.ZodEffects<z.ZodString, `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}` | `https://${string}`, string>>;
|
68
71
|
}, "strip", z.ZodTypeAny, {
|
69
|
-
resource: string
|
70
|
-
jwks_uri?: string | undefined;
|
72
|
+
resource: `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}` | `https://${string}`;
|
73
|
+
jwks_uri?: `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}` | `https://${string}` | undefined;
|
71
74
|
scopes_supported?: string[] | undefined;
|
72
|
-
authorization_servers?: string[] | undefined;
|
75
|
+
authorization_servers?: (`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}` | `https://${string}`)[] | undefined;
|
73
76
|
bearer_methods_supported?: ("query" | "header" | "body")[] | undefined;
|
74
77
|
resource_signing_alg_values_supported?: string[] | undefined;
|
75
|
-
resource_documentation?: string | undefined;
|
76
|
-
resource_policy_uri?: string | undefined;
|
77
|
-
resource_tos_uri?: string | undefined;
|
78
|
+
resource_documentation?: `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}` | `https://${string}` | undefined;
|
79
|
+
resource_policy_uri?: `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}` | `https://${string}` | undefined;
|
80
|
+
resource_tos_uri?: `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}` | `https://${string}` | undefined;
|
78
81
|
}, {
|
79
82
|
resource: string;
|
80
83
|
jwks_uri?: string | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-protected-resource-metadata.d.ts","sourceRoot":"","sources":["../src/oauth-protected-resource-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"oauth-protected-resource-metadata.d.ts","sourceRoot":"","sources":["../src/oauth-protected-resource-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,oCAAoC;IAC/C;;;;;;;OAOG;;IASH;;;;;;;OAOG;;IAGH;;;;;;;OAOG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAKH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAA"}
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.oauthProtectedResourceMetadataSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const oauth_issuer_identifier_js_1 = require("./oauth-issuer-identifier.js");
|
6
|
+
const uri_js_1 = require("./uri.js");
|
6
7
|
/**
|
7
8
|
* @see {@link https://datatracker.ietf.org/doc/html/draft-ietf-oauth-resource-metadata-05#name-protected-resource-metadata-r}
|
8
9
|
*/
|
@@ -11,8 +12,17 @@ exports.oauthProtectedResourceMetadataSchema = zod_1.z.object({
|
|
11
12
|
* REQUIRED. The protected resource's resource identifier, which is a URL that
|
12
13
|
* uses the https scheme and has no query or fragment components. Using these
|
13
14
|
* well-known resources is described in Section 3.
|
15
|
+
*
|
16
|
+
* @note This schema allows non https URLs for testing & development purposes.
|
17
|
+
* Make sure to validate the URL before using it in a production environment.
|
14
18
|
*/
|
15
|
-
resource:
|
19
|
+
resource: uri_js_1.webUriSchema
|
20
|
+
.refine((url) => !url.includes('?'), {
|
21
|
+
message: 'Resource URL must not contain query parameters',
|
22
|
+
})
|
23
|
+
.refine((url) => !url.includes('#'), {
|
24
|
+
message: 'Resource URL must not contain a fragment',
|
25
|
+
}),
|
16
26
|
/**
|
17
27
|
* OPTIONAL. JSON array containing a list of OAuth authorization server issuer
|
18
28
|
* identifiers, as defined in [RFC8414], for authorization servers that can be
|
@@ -30,7 +40,7 @@ exports.oauthProtectedResourceMetadataSchema = zod_1.z.object({
|
|
30
40
|
* available, a use (public key use) parameter value is REQUIRED for all keys
|
31
41
|
* in the referenced JWK Set to indicate each key's intended usage.
|
32
42
|
*/
|
33
|
-
jwks_uri:
|
43
|
+
jwks_uri: uri_js_1.webUriSchema.optional(),
|
34
44
|
/**
|
35
45
|
* RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope
|
36
46
|
* values that are used in authorization requests to request access to this
|
@@ -59,17 +69,17 @@ exports.oauthProtectedResourceMetadataSchema = zod_1.z.object({
|
|
59
69
|
* OPTIONAL. URL of a page containing human-readable information that
|
60
70
|
* developers might want or need to know when using the protected resource
|
61
71
|
*/
|
62
|
-
resource_documentation:
|
72
|
+
resource_documentation: uri_js_1.webUriSchema.optional(),
|
63
73
|
/**
|
64
74
|
* OPTIONAL. URL that the protected resource provides to read about the
|
65
75
|
* protected resource's requirements on how the client can use the data
|
66
76
|
* provided by the protected resource
|
67
77
|
*/
|
68
|
-
resource_policy_uri:
|
78
|
+
resource_policy_uri: uri_js_1.webUriSchema.optional(),
|
69
79
|
/**
|
70
80
|
* OPTIONAL. URL that the protected resource provides to read about the
|
71
81
|
* protected resource's terms of service
|
72
82
|
*/
|
73
|
-
resource_tos_uri:
|
83
|
+
resource_tos_uri: uri_js_1.webUriSchema.optional(),
|
74
84
|
});
|
75
85
|
//# sourceMappingURL=oauth-protected-resource-metadata.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-protected-resource-metadata.js","sourceRoot":"","sources":["../src/oauth-protected-resource-metadata.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,6EAA0E;
|
1
|
+
{"version":3,"file":"oauth-protected-resource-metadata.js","sourceRoot":"","sources":["../src/oauth-protected-resource-metadata.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,6EAA0E;AAC1E,qCAAuC;AAEvC;;GAEG;AACU,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D;;;;;;;OAOG;IACH,QAAQ,EAAE,qBAAY;SACnB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACnC,OAAO,EAAE,gDAAgD;KAC1D,CAAC;SACD,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACnC,OAAO,EAAE,0CAA0C;KACpD,CAAC;IAEJ;;;;;;;OAOG;IACH,qBAAqB,EAAE,OAAC,CAAC,KAAK,CAAC,wDAA2B,CAAC,CAAC,QAAQ,EAAE;IAEtE;;;;;;;OAOG;IACH,QAAQ,EAAE,qBAAY,CAAC,QAAQ,EAAE;IAEjC;;;;;OAKG;IACH,gBAAgB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEhD;;;;;OAKG;IACH,wBAAwB,EAAE,OAAC;SACxB,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;SAC1C,QAAQ,EAAE;IAEb;;;;;;OAMG;IACH,qCAAqC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAErE;;;OAGG;IACH,sBAAsB,EAAE,qBAAY,CAAC,QAAQ,EAAE;IAE/C;;;;OAIG;IACH,mBAAmB,EAAE,qBAAY,CAAC,QAAQ,EAAE;IAE5C;;;OAGG;IACH,gBAAgB,EAAE,qBAAY,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { TypeOf, z } from 'zod';
|
2
|
+
export declare const oauthLoopbackRedirectURISchema: 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>;
|
3
|
+
export type OAuthLoopbackRedirectURI = TypeOf<typeof oauthLoopbackRedirectURISchema>;
|
4
|
+
export declare const oauthHttpsRedirectURISchema: z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `https://${string}`, string>;
|
5
|
+
export type OAuthHttpsRedirectURI = TypeOf<typeof oauthHttpsRedirectURISchema>;
|
6
|
+
export declare const oauthPrivateUseRedirectURISchema: z.ZodEffects<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, `${string}.${string}:/${string}`, string>;
|
7
|
+
export type OAuthPrivateUseRedirectURI = TypeOf<typeof oauthPrivateUseRedirectURISchema>;
|
8
|
+
export declare const oauthRedirectUriSchema: 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
|
+
export type OAuthRedirectUri = TypeOf<typeof oauthRedirectUriSchema>;
|
10
|
+
//# sourceMappingURL=oauth-redirect-uri.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-redirect-uri.d.ts","sourceRoot":"","sources":["../src/oauth-redirect-uri.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,CAAC,EAAgB,MAAM,KAAK,CAAA;AAQ7C,eAAO,MAAM,8BAA8B,2kBAuB1C,CAAA;AACD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,OAAO,8BAA8B,CACtC,CAAA;AAED,eAAO,MAAM,2BAA2B,qGAAiB,CAAA;AACzD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE9E,eAAO,MAAM,gCAAgC,kHAAsB,CAAA;AACnE,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAC7C,OAAO,gCAAgC,CACxC,CAAA;AAED,eAAO,MAAM,sBAAsB,gzBASlC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.oauthRedirectUriSchema = exports.oauthPrivateUseRedirectURISchema = exports.oauthHttpsRedirectURISchema = exports.oauthLoopbackRedirectURISchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const uri_js_1 = require("./uri.js");
|
6
|
+
exports.oauthLoopbackRedirectURISchema = uri_js_1.loopbackUriSchema.superRefine((value, ctx) => {
|
7
|
+
if (value.startsWith('http://localhost')) {
|
8
|
+
// https://datatracker.ietf.org/doc/html/rfc8252#section-8.3
|
9
|
+
//
|
10
|
+
// > While redirect URIs using localhost (i.e.,
|
11
|
+
// > "http://localhost:{port}/{path}") function similarly to loopback IP
|
12
|
+
// > redirects described in Section 7.3, the use of localhost is NOT
|
13
|
+
// > RECOMMENDED. Specifying a redirect URI with the loopback IP literal
|
14
|
+
// > rather than localhost avoids inadvertently listening on network
|
15
|
+
// > interfaces other than the loopback interface. It is also less
|
16
|
+
// > susceptible to client-side firewalls and misconfigured host name
|
17
|
+
// > resolution on the user's device.
|
18
|
+
ctx.addIssue({
|
19
|
+
code: zod_1.ZodIssueCode.custom,
|
20
|
+
message: 'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead',
|
21
|
+
});
|
22
|
+
return false;
|
23
|
+
}
|
24
|
+
return true;
|
25
|
+
});
|
26
|
+
exports.oauthHttpsRedirectURISchema = uri_js_1.httpsUriSchema;
|
27
|
+
exports.oauthPrivateUseRedirectURISchema = uri_js_1.privateUseUriSchema;
|
28
|
+
exports.oauthRedirectUriSchema = zod_1.z.union([
|
29
|
+
exports.oauthLoopbackRedirectURISchema,
|
30
|
+
exports.oauthHttpsRedirectURISchema,
|
31
|
+
exports.oauthPrivateUseRedirectURISchema,
|
32
|
+
], {
|
33
|
+
message: `URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)`,
|
34
|
+
});
|
35
|
+
//# sourceMappingURL=oauth-redirect-uri.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-redirect-uri.js","sourceRoot":"","sources":["../src/oauth-redirect-uri.ts"],"names":[],"mappings":";;;AAAA,6BAA6C;AAC7C,qCAKiB;AAEJ,QAAA,8BAA8B,GAAG,0BAAiB,CAAC,WAAW,CACzE,CAAC,KAAK,EAAE,GAAG,EAA8D,EAAE;IACzE,IAAI,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACzC,4DAA4D;QAC5D,EAAE;QACF,+CAA+C;QAC/C,wEAAwE;QACxE,oEAAoE;QACpE,yEAAyE;QACzE,oEAAoE;QACpE,mEAAmE;QACnE,qEAAqE;QACrE,qCAAqC;QACrC,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,kBAAY,CAAC,MAAM;YACzB,OAAO,EACL,sGAAsG;SACzG,CAAC,CAAA;QACF,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CACF,CAAA;AAKY,QAAA,2BAA2B,GAAG,uBAAc,CAAA;AAG5C,QAAA,gCAAgC,GAAG,4BAAmB,CAAA;AAKtD,QAAA,sBAAsB,GAAG,OAAC,CAAC,KAAK,CAC3C;IACE,sCAA8B;IAC9B,mCAA2B;IAC3B,wCAAgC;CACjC,EACD;IACE,OAAO,EAAE,uFAAuF;CACjG,CACF,CAAA"}
|
@@ -2,14 +2,11 @@ import { z } from 'zod';
|
|
2
2
|
export declare const oauthRefreshTokenGrantTokenRequestSchema: z.ZodObject<{
|
3
3
|
grant_type: z.ZodLiteral<"refresh_token">;
|
4
4
|
refresh_token: z.ZodString;
|
5
|
-
client_id: z.ZodString;
|
6
5
|
}, "strip", z.ZodTypeAny, {
|
7
6
|
refresh_token: string;
|
8
|
-
client_id: string;
|
9
7
|
grant_type: "refresh_token";
|
10
8
|
}, {
|
11
9
|
refresh_token: string;
|
12
|
-
client_id: string;
|
13
10
|
grant_type: "refresh_token";
|
14
11
|
}>;
|
15
12
|
export type OAuthRefreshTokenGrantTokenRequest = z.infer<typeof oauthRefreshTokenGrantTokenRequestSchema>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-refresh-token-grant-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-refresh-token-grant-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
1
|
+
{"version":3,"file":"oauth-refresh-token-grant-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-refresh-token-grant-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,wCAAwC;;;;;;;;;EAGnD,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAA"}
|
@@ -2,11 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.oauthRefreshTokenGrantTokenRequestSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const oauth_client_id_js_1 = require("./oauth-client-id.js");
|
6
5
|
const oauth_refresh_token_js_1 = require("./oauth-refresh-token.js");
|
7
6
|
exports.oauthRefreshTokenGrantTokenRequestSchema = zod_1.z.object({
|
8
7
|
grant_type: zod_1.z.literal('refresh_token'),
|
9
8
|
refresh_token: oauth_refresh_token_js_1.oauthRefreshTokenSchema,
|
10
|
-
client_id: oauth_client_id_js_1.oauthClientIdSchema,
|
11
9
|
});
|
12
10
|
//# sourceMappingURL=oauth-refresh-token-grant-token-request.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-refresh-token-grant-token-request.js","sourceRoot":"","sources":["../src/oauth-refresh-token-grant-token-request.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,
|
1
|
+
{"version":3,"file":"oauth-refresh-token-grant-token-request.js","sourceRoot":"","sources":["../src/oauth-refresh-token-grant-token-request.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,qEAAkE;AAErD,QAAA,wCAAwC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/D,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IACtC,aAAa,EAAE,gDAAuB;CACvC,CAAC,CAAA"}
|
@@ -2,11 +2,11 @@ import { z } from 'zod';
|
|
2
2
|
export declare const oauthTokenRequestSchema: z.ZodDiscriminatedUnion<"grant_type", [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
|
code_verifier: z.ZodOptional<z.ZodString>;
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
8
8
|
code: string;
|
9
|
-
redirect_uri: string
|
9
|
+
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}`;
|
10
10
|
grant_type: "authorization_code";
|
11
11
|
code_verifier?: string | undefined;
|
12
12
|
}, {
|
@@ -17,14 +17,11 @@ export declare const oauthTokenRequestSchema: z.ZodDiscriminatedUnion<"grant_typ
|
|
17
17
|
}>, z.ZodObject<{
|
18
18
|
grant_type: z.ZodLiteral<"refresh_token">;
|
19
19
|
refresh_token: z.ZodString;
|
20
|
-
client_id: z.ZodString;
|
21
20
|
}, "strip", z.ZodTypeAny, {
|
22
21
|
refresh_token: string;
|
23
|
-
client_id: string;
|
24
22
|
grant_type: "refresh_token";
|
25
23
|
}, {
|
26
24
|
refresh_token: string;
|
27
|
-
client_id: string;
|
28
25
|
grant_type: "refresh_token";
|
29
26
|
}>, z.ZodObject<{
|
30
27
|
grant_type: z.ZodLiteral<"password">;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,uBAAuB
|
1
|
+
{"version":3,"file":"oauth-token-request.d.ts","sourceRoot":"","sources":["../src/oauth-token-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
@@ -5,21 +5,20 @@ import { z } from 'zod';
|
|
5
5
|
export declare const oauthTokenResponseSchema: z.ZodObject<{
|
6
6
|
access_token: z.ZodString;
|
7
7
|
token_type: z.ZodUnion<[z.ZodEffects<z.ZodString, "DPoP", string>, z.ZodEffects<z.ZodString, "Bearer", string>]>;
|
8
|
-
issuer: z.ZodOptional<z.ZodString>;
|
9
8
|
scope: z.ZodOptional<z.ZodString>;
|
10
|
-
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
11
9
|
refresh_token: z.ZodOptional<z.ZodString>;
|
12
10
|
expires_in: z.ZodOptional<z.ZodNumber>;
|
11
|
+
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
13
12
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
14
13
|
type: z.ZodString;
|
15
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
14
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
16
15
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
17
16
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
18
17
|
identifier: z.ZodOptional<z.ZodString>;
|
19
18
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
20
19
|
}, "strip", z.ZodTypeAny, {
|
21
20
|
type: string;
|
22
|
-
locations?: string[] | undefined;
|
21
|
+
locations?: `${string}:${string}`[] | undefined;
|
23
22
|
actions?: string[] | undefined;
|
24
23
|
datatypes?: string[] | undefined;
|
25
24
|
identifier?: string | undefined;
|
@@ -35,21 +34,20 @@ export declare const oauthTokenResponseSchema: z.ZodObject<{
|
|
35
34
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
36
35
|
access_token: z.ZodString;
|
37
36
|
token_type: z.ZodUnion<[z.ZodEffects<z.ZodString, "DPoP", string>, z.ZodEffects<z.ZodString, "Bearer", string>]>;
|
38
|
-
issuer: z.ZodOptional<z.ZodString>;
|
39
37
|
scope: z.ZodOptional<z.ZodString>;
|
40
|
-
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
41
38
|
refresh_token: z.ZodOptional<z.ZodString>;
|
42
39
|
expires_in: z.ZodOptional<z.ZodNumber>;
|
40
|
+
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
43
41
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
44
42
|
type: z.ZodString;
|
45
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
43
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
46
44
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
47
45
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
48
46
|
identifier: z.ZodOptional<z.ZodString>;
|
49
47
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
50
48
|
}, "strip", z.ZodTypeAny, {
|
51
49
|
type: string;
|
52
|
-
locations?: string[] | undefined;
|
50
|
+
locations?: `${string}:${string}`[] | undefined;
|
53
51
|
actions?: string[] | undefined;
|
54
52
|
datatypes?: string[] | undefined;
|
55
53
|
identifier?: string | undefined;
|
@@ -65,21 +63,20 @@ export declare const oauthTokenResponseSchema: z.ZodObject<{
|
|
65
63
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
66
64
|
access_token: z.ZodString;
|
67
65
|
token_type: z.ZodUnion<[z.ZodEffects<z.ZodString, "DPoP", string>, z.ZodEffects<z.ZodString, "Bearer", string>]>;
|
68
|
-
issuer: z.ZodOptional<z.ZodString>;
|
69
66
|
scope: z.ZodOptional<z.ZodString>;
|
70
|
-
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
71
67
|
refresh_token: z.ZodOptional<z.ZodString>;
|
72
68
|
expires_in: z.ZodOptional<z.ZodNumber>;
|
69
|
+
id_token: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>>;
|
73
70
|
authorization_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
74
71
|
type: z.ZodString;
|
75
|
-
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
72
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `${string}:${string}`, string>, "many">>;
|
76
73
|
actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
77
74
|
datatypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
78
75
|
identifier: z.ZodOptional<z.ZodString>;
|
79
76
|
privileges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
80
77
|
}, "strip", z.ZodTypeAny, {
|
81
78
|
type: string;
|
82
|
-
locations?: string[] | undefined;
|
79
|
+
locations?: `${string}:${string}`[] | undefined;
|
83
80
|
actions?: string[] | undefined;
|
84
81
|
datatypes?: string[] | undefined;
|
85
82
|
identifier?: string | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-token-response.d.ts","sourceRoot":"","sources":["../src/oauth-token-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,wBAAwB
|
1
|
+
{"version":3,"file":"oauth-token-response.d.ts","sourceRoot":"","sources":["../src/oauth-token-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAerB,CAAA;AAEhB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
@@ -10,13 +10,15 @@ const oauth_token_type_js_1 = require("./oauth-token-type.js");
|
|
10
10
|
*/
|
11
11
|
exports.oauthTokenResponseSchema = zod_1.z
|
12
12
|
.object({
|
13
|
+
// https://www.rfc-editor.org/rfc/rfc6749.html#section-5.1
|
13
14
|
access_token: zod_1.z.string(),
|
14
15
|
token_type: oauth_token_type_js_1.oauthTokenTypeSchema,
|
15
|
-
issuer: zod_1.z.string().url().optional(),
|
16
16
|
scope: zod_1.z.string().optional(),
|
17
|
-
id_token: jwk_1.signedJwtSchema.optional(),
|
18
17
|
refresh_token: zod_1.z.string().optional(),
|
19
18
|
expires_in: zod_1.z.number().optional(),
|
19
|
+
// https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse
|
20
|
+
id_token: jwk_1.signedJwtSchema.optional(),
|
21
|
+
// https://datatracker.ietf.org/doc/html/rfc9396#name-enriched-authorization-deta
|
20
22
|
authorization_details: oauth_authorization_details_js_1.oauthAuthorizationDetailsSchema.optional(),
|
21
23
|
})
|
22
24
|
// https://www.rfc-editor.org/rfc/rfc6749.html#section-5.1
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-token-response.js","sourceRoot":"","sources":["../src/oauth-token-response.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,+DAA4D;AAE5D;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,0CAAoB;IAChC,
|
1
|
+
{"version":3,"file":"oauth-token-response.js","sourceRoot":"","sources":["../src/oauth-token-response.ts"],"names":[],"mappings":";;;AAAA,sCAA8C;AAC9C,6BAAuB;AAEvB,qFAAkF;AAClF,+DAA4D;AAE5D;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,0DAA0D;IAC1D,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,0CAAoB;IAChC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,sEAAsE;IACtE,QAAQ,EAAE,qBAAe,CAAC,QAAQ,EAAE;IACpC,iFAAiF;IACjF,qBAAqB,EAAE,gEAA+B,CAAC,QAAQ,EAAE;CAClE,CAAC;IACF,0DAA0D;IAC1D,qEAAqE;KACpE,WAAW,EAAE,CAAA"}
|