@atproto/oauth-types 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- 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/oauth-authorization-request-par.d.ts +3 -3
- package/dist/oauth-authorization-request-parameters.d.ts +3 -3
- package/dist/oauth-authorization-request-parameters.js +1 -1
- package/dist/oauth-authorization-request-parameters.js.map +1 -1
- package/dist/oauth-authorization-request-query.d.ts +3 -3
- package/dist/oauth-authorization-server-metadata.d.ts +6 -6
- package/dist/oauth-client-id-discoverable.js +3 -4
- package/dist/oauth-client-id-discoverable.js.map +1 -1
- package/dist/oauth-client-id-loopback.js +3 -4
- package/dist/oauth-client-id-loopback.js.map +1 -1
- package/dist/oauth-client-metadata.d.ts +90 -90
- package/dist/oauth-client-metadata.d.ts.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 +13 -12
- package/dist/oauth-issuer-identifier.js.map +1 -1
- package/dist/oauth-protected-resource-metadata.d.ts +2 -2
- 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 +0 -3
- package/dist/oauth-token-request.d.ts.map +1 -1
- package/dist/oauth-token-response.d.ts +3 -6
- 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/util.js +5 -6
- package/dist/util.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.ts +0 -16
- package/src/oauth-authorization-request-parameters.ts +1 -1
- package/src/oauth-issuer-identifier.ts +17 -12
- package/src/oauth-refresh-token-grant-token-request.ts +0 -2
- package/src/oauth-token-response.ts +4 -2
- 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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D,CAAC;iBAAmC,CAAC;iBAAmC,CAAC;;;;;;;eAAwK,CAAC;eAAsD,CAAC;eAAiC,CAAC;eAAkC,CAAC;mBAA4C,CAAC;eAA+H,CAAC;eAAmC,CAAC;sBAAwC,CAAC;eAAiC,CAAC;aAA+B,CAAC;;;;;;eAA8H,CAAC;eAAmC,CAAC;eAAiC,CAAC;eAAkC,CAAC;mBAA4C,CAAC;eAA+H,CAAC;eAAmC,CAAC;sBAAwC,CAAC;eAAiC,CAAC;aAA+B,CAAC;;;;;eAAoH,CAAC;eAAkC,CAAC;eAAiC,CAAC;eAAkC,CAAC;mBAA4C,CAAC;eAA+H,CAAC;eAAmC,CAAC;sBAAwC,CAAC;eAAiC,CAAC;aAA+B,CAAC;;;;eAAkF,CAAC;eAAsD,CAAC;eAAiC,CAAC;eAAkC,CAAC;mBAA4C,CAAC;eAA+H,CAAC;eAAmC,CAAC;sBAAwC,CAAC;eAAiC,CAAC;;;eAAgE,CAAC;eAAiC,CAAC;eAAiC,CAAC;eAAkC,CAAC;mBAA4C,CAAC;eAA+H,CAAC;eAAmC,CAAC;sBAAwC,CAAC;eAAiC,CAAC;;;;;;;;;;;;;;;;;;;;;;EAJ3phE,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC3E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,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.ZodString, `http://${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,6EAwDpC,CAAA;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.oauthIssuerIdentifierSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_js_1 = require("./constants.js");
|
6
5
|
const util_js_1 = require("./util.js");
|
7
6
|
exports.oauthIssuerIdentifierSchema = zod_1.z
|
8
7
|
.string()
|
@@ -13,36 +12,36 @@ exports.oauthIssuerIdentifierSchema = zod_1.z
|
|
13
12
|
code: zod_1.z.ZodIssueCode.custom,
|
14
13
|
message: 'Issuer URL must not end with a slash',
|
15
14
|
});
|
15
|
+
return false;
|
16
16
|
}
|
17
17
|
const url = (0, util_js_1.safeUrl)(value);
|
18
18
|
if (!url) {
|
19
|
-
|
19
|
+
ctx.addIssue({
|
20
20
|
code: zod_1.z.ZodIssueCode.custom,
|
21
21
|
message: 'Invalid url',
|
22
22
|
});
|
23
|
+
return false;
|
23
24
|
}
|
24
|
-
if (url.protocol !== 'https:') {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
code: zod_1.z.ZodIssueCode.custom,
|
31
|
-
message: 'Issuer must be an HTTPS URL',
|
32
|
-
});
|
33
|
-
}
|
25
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
26
|
+
ctx.addIssue({
|
27
|
+
code: zod_1.z.ZodIssueCode.custom,
|
28
|
+
message: `Invalid issuer URL protocol "${url.protocol}"`,
|
29
|
+
});
|
30
|
+
return false;
|
34
31
|
}
|
35
32
|
if (url.username || url.password) {
|
36
33
|
ctx.addIssue({
|
37
34
|
code: zod_1.z.ZodIssueCode.custom,
|
38
35
|
message: 'Issuer URL must not contain a username or password',
|
39
36
|
});
|
37
|
+
return false;
|
40
38
|
}
|
41
39
|
if (url.hash || url.search) {
|
42
40
|
ctx.addIssue({
|
43
41
|
code: zod_1.z.ZodIssueCode.custom,
|
44
42
|
message: 'Issuer URL must not contain a query or fragment',
|
45
43
|
});
|
44
|
+
return false;
|
46
45
|
}
|
47
46
|
const canonicalValue = url.pathname === '/' ? url.origin : url.href;
|
48
47
|
if (value !== canonicalValue) {
|
@@ -50,6 +49,8 @@ exports.oauthIssuerIdentifierSchema = zod_1.z
|
|
50
49
|
code: zod_1.z.ZodIssueCode.custom,
|
51
50
|
message: 'Issuer URL must be in the canonical form',
|
52
51
|
});
|
52
|
+
return false;
|
53
53
|
}
|
54
|
+
return true;
|
54
55
|
});
|
55
56
|
//# 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,uCAAmC;AAEtB,QAAA,2BAA2B,GAAG,OAAC;KACzC,MAAM,EAAE;KACR,WAAW,CAAC,CAAC,KAAK,EAAE,GAAG,EAA8C,EAAE;IACtE,uCAAuC;IAEvC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,OAAC,CAAC,YAA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Ac,EAAE,CAAC;QAC7B,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,0CAA0C;SACpD,CAAC,CAAA;QACF,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAC,CAAA"}
|
@@ -17,7 +17,7 @@ export declare const oauthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
17
17
|
* used. In some use cases, the set of authorization servers will not be
|
18
18
|
* enumerable, in which case this metadata parameter would not be used.
|
19
19
|
*/
|
20
|
-
authorization_servers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string
|
20
|
+
authorization_servers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, `http://${string}` | `https://${string}`, string>, "many">>;
|
21
21
|
/**
|
22
22
|
* OPTIONAL. URL of the protected resource's JWK Set [JWK] document. This
|
23
23
|
* contains public keys belonging to the protected resource, such as signing
|
@@ -69,7 +69,7 @@ export declare const oauthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
69
69
|
resource: string;
|
70
70
|
jwks_uri?: string | undefined;
|
71
71
|
scopes_supported?: string[] | undefined;
|
72
|
-
authorization_servers?: string[] | undefined;
|
72
|
+
authorization_servers?: (`http://${string}` | `https://${string}`)[] | undefined;
|
73
73
|
bearer_methods_supported?: ("query" | "header" | "body")[] | undefined;
|
74
74
|
resource_signing_alg_values_supported?: string[] | undefined;
|
75
75
|
resource_documentation?: string | undefined;
|
@@ -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"}
|
@@ -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,11 +5,10 @@ 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
14
|
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
@@ -35,11 +34,10 @@ 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
43
|
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
@@ -65,11 +63,10 @@ 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
72
|
locations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
@@ -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"}
|
package/dist/util.js
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isHostnameIP = isHostnameIP;
|
4
|
+
exports.isLoopbackHost = isLoopbackHost;
|
5
|
+
exports.isLoopbackUrl = isLoopbackUrl;
|
6
|
+
exports.safeUrl = safeUrl;
|
7
|
+
exports.extractUrlPath = extractUrlPath;
|
4
8
|
function isHostnameIP(hostname) {
|
5
9
|
// IPv4
|
6
10
|
if (hostname.match(/^\d+\.\d+\.\d+\.\d+$/))
|
@@ -10,16 +14,13 @@ function isHostnameIP(hostname) {
|
|
10
14
|
return true;
|
11
15
|
return false;
|
12
16
|
}
|
13
|
-
exports.isHostnameIP = isHostnameIP;
|
14
17
|
function isLoopbackHost(host) {
|
15
18
|
return host === 'localhost' || host === '127.0.0.1' || host === '[::1]';
|
16
19
|
}
|
17
|
-
exports.isLoopbackHost = isLoopbackHost;
|
18
20
|
function isLoopbackUrl(input) {
|
19
21
|
const url = typeof input === 'string' ? new URL(input) : input;
|
20
22
|
return isLoopbackHost(url.hostname);
|
21
23
|
}
|
22
|
-
exports.isLoopbackUrl = isLoopbackUrl;
|
23
24
|
function safeUrl(input) {
|
24
25
|
try {
|
25
26
|
return new URL(input);
|
@@ -28,7 +29,6 @@ function safeUrl(input) {
|
|
28
29
|
return null;
|
29
30
|
}
|
30
31
|
}
|
31
|
-
exports.safeUrl = safeUrl;
|
32
32
|
function extractUrlPath(url) {
|
33
33
|
// Extracts the path from a URL, without relying on the URL constructor
|
34
34
|
// (because it normalizes the URL)
|
@@ -59,5 +59,4 @@ function extractUrlPath(url) {
|
|
59
59
|
}
|
60
60
|
return url.substring(pathStart, pathEnd);
|
61
61
|
}
|
62
|
-
exports.extractUrlPath = extractUrlPath;
|
63
62
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;AAAA,oCAQC;AAID,wCAEC;AAED,sCAGC;AAED,0BAMC;AAED,wCAsCC;AAnED,SAAgB,YAAY,CAAC,QAAgB;IAC3C,OAAO;IACP,IAAI,QAAQ,CAAC,KAAK,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAA;IAEvD,OAAO;IACP,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEnE,OAAO,KAAK,CAAA;AACd,CAAC;AAID,SAAgB,cAAc,CAAC,IAAa;IAC1C,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,OAAO,CAAA;AACzE,CAAC;AAED,SAAgB,aAAa,CAAC,KAAmB;IAC/C,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC9D,OAAO,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA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,CAAC,CAAA;IAEhD,MAAM,SAAS,GAAG,QAAQ,KAAK,CAAC,CAAC,IAAI,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAA;IAE5E,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAChD,CAAC;IAED,OAAO,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC1C,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/oauth-types",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.2.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "OAuth typing & validation library",
|
6
6
|
"keywords": [
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"@atproto/jwk": "0.1.1"
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
32
|
-
"typescript": "^5.
|
32
|
+
"typescript": "^5.6.3"
|
33
33
|
},
|
34
34
|
"scripts": {
|
35
35
|
"build": "tsc --build tsconfig.build.json"
|
package/src/constants.ts
CHANGED
@@ -1,18 +1,2 @@
|
|
1
|
-
/**
|
2
|
-
* A variable that allows to determine if unsecure origins should be allowed
|
3
|
-
* in OAuth related URI's. This variable is only set to `true` when NODE_ENV
|
4
|
-
* is either `development` or `test`.
|
5
|
-
*/
|
6
|
-
export const ALLOW_UNSECURE_ORIGINS = (() => {
|
7
|
-
// try/catch to support running in a browser, including when process.env is
|
8
|
-
// shimmed (e.g. by webpack)
|
9
|
-
try {
|
10
|
-
const env = process.env.NODE_ENV
|
11
|
-
return env === 'development' || env === 'test'
|
12
|
-
} catch {
|
13
|
-
return false
|
14
|
-
}
|
15
|
-
})()
|
16
|
-
|
17
1
|
export const CLIENT_ASSERTION_TYPE_JWT_BEARER =
|
18
2
|
'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'
|
@@ -73,7 +73,7 @@ export const oauthAuthorizationRequestParametersSchema = z.object({
|
|
73
73
|
id_token_hint: signedJwtSchema.optional(),
|
74
74
|
|
75
75
|
// Type of UI the AS is displayed on
|
76
|
-
display: z.enum(['page', 'popup', 'touch']).optional(),
|
76
|
+
display: z.enum(['page', 'popup', 'touch', 'wap']).optional(),
|
77
77
|
|
78
78
|
/**
|
79
79
|
* - "none" will only be allowed if the user already allowed the client on the same device
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import { z } from 'zod'
|
2
|
-
import { ALLOW_UNSECURE_ORIGINS } from './constants.js'
|
3
2
|
import { safeUrl } from './util.js'
|
4
3
|
|
5
4
|
export const oauthIssuerIdentifierSchema = z
|
6
5
|
.string()
|
7
|
-
.superRefine((value, ctx) => {
|
6
|
+
.superRefine((value, ctx): value is `${'http' | 'https'}://${string}` => {
|
8
7
|
// Validate the issuer (MIX-UP attacks)
|
9
8
|
|
10
9
|
if (value.endsWith('/')) {
|
@@ -12,25 +11,24 @@ export const oauthIssuerIdentifierSchema = z
|
|
12
11
|
code: z.ZodIssueCode.custom,
|
13
12
|
message: 'Issuer URL must not end with a slash',
|
14
13
|
})
|
14
|
+
return false
|
15
15
|
}
|
16
16
|
|
17
17
|
const url = safeUrl(value)
|
18
18
|
if (!url) {
|
19
|
-
|
19
|
+
ctx.addIssue({
|
20
20
|
code: z.ZodIssueCode.custom,
|
21
21
|
message: 'Invalid url',
|
22
22
|
})
|
23
|
+
return false
|
23
24
|
}
|
24
25
|
|
25
|
-
if (url.protocol !== 'https:') {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
message: 'Issuer must be an HTTPS URL',
|
32
|
-
})
|
33
|
-
}
|
26
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
27
|
+
ctx.addIssue({
|
28
|
+
code: z.ZodIssueCode.custom,
|
29
|
+
message: `Invalid issuer URL protocol "${url.protocol}"`,
|
30
|
+
})
|
31
|
+
return false
|
34
32
|
}
|
35
33
|
|
36
34
|
if (url.username || url.password) {
|
@@ -38,6 +36,7 @@ export const oauthIssuerIdentifierSchema = z
|
|
38
36
|
code: z.ZodIssueCode.custom,
|
39
37
|
message: 'Issuer URL must not contain a username or password',
|
40
38
|
})
|
39
|
+
return false
|
41
40
|
}
|
42
41
|
|
43
42
|
if (url.hash || url.search) {
|
@@ -45,6 +44,7 @@ export const oauthIssuerIdentifierSchema = z
|
|
45
44
|
code: z.ZodIssueCode.custom,
|
46
45
|
message: 'Issuer URL must not contain a query or fragment',
|
47
46
|
})
|
47
|
+
return false
|
48
48
|
}
|
49
49
|
|
50
50
|
const canonicalValue = url.pathname === '/' ? url.origin : url.href
|
@@ -53,5 +53,10 @@ export const oauthIssuerIdentifierSchema = z
|
|
53
53
|
code: z.ZodIssueCode.custom,
|
54
54
|
message: 'Issuer URL must be in the canonical form',
|
55
55
|
})
|
56
|
+
return false
|
56
57
|
}
|
58
|
+
|
59
|
+
return true
|
57
60
|
})
|
61
|
+
|
62
|
+
export type OAuthIssuerIdentifier = z.infer<typeof oauthIssuerIdentifierSchema>
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import { z } from 'zod'
|
2
|
-
import { oauthClientIdSchema } from './oauth-client-id.js'
|
3
2
|
import { oauthRefreshTokenSchema } from './oauth-refresh-token.js'
|
4
3
|
|
5
4
|
export const oauthRefreshTokenGrantTokenRequestSchema = z.object({
|
6
5
|
grant_type: z.literal('refresh_token'),
|
7
6
|
refresh_token: oauthRefreshTokenSchema,
|
8
|
-
client_id: oauthClientIdSchema,
|
9
7
|
})
|
10
8
|
|
11
9
|
export type OAuthRefreshTokenGrantTokenRequest = z.infer<
|
@@ -9,13 +9,15 @@ import { oauthTokenTypeSchema } from './oauth-token-type.js'
|
|
9
9
|
*/
|
10
10
|
export const oauthTokenResponseSchema = z
|
11
11
|
.object({
|
12
|
+
// https://www.rfc-editor.org/rfc/rfc6749.html#section-5.1
|
12
13
|
access_token: z.string(),
|
13
14
|
token_type: oauthTokenTypeSchema,
|
14
|
-
issuer: z.string().url().optional(),
|
15
15
|
scope: z.string().optional(),
|
16
|
-
id_token: signedJwtSchema.optional(),
|
17
16
|
refresh_token: z.string().optional(),
|
18
17
|
expires_in: z.number().optional(),
|
18
|
+
// https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse
|
19
|
+
id_token: signedJwtSchema.optional(),
|
20
|
+
// https://datatracker.ietf.org/doc/html/rfc9396#name-enriched-authorization-deta
|
19
21
|
authorization_details: oauthAuthorizationDetailsSchema.optional(),
|
20
22
|
})
|
21
23
|
// https://www.rfc-editor.org/rfc/rfc6749.html#section-5.1
|
@@ -0,0 +1 @@
|
|
1
|
+
{"root":["./src/atproto-loopback-client-metadata.ts","./src/constants.ts","./src/index.ts","./src/oauth-access-token.ts","./src/oauth-authorization-code-grant-token-request.ts","./src/oauth-authorization-details.ts","./src/oauth-authorization-request-jar.ts","./src/oauth-authorization-request-par.ts","./src/oauth-authorization-request-parameters.ts","./src/oauth-authorization-request-query.ts","./src/oauth-authorization-request-uri.ts","./src/oauth-authorization-server-metadata.ts","./src/oauth-client-credentials-grant-token-request.ts","./src/oauth-client-credentials.ts","./src/oauth-client-id-discoverable.ts","./src/oauth-client-id-loopback.ts","./src/oauth-client-id.ts","./src/oauth-client-metadata.ts","./src/oauth-code-challenge-method.ts","./src/oauth-endpoint-auth-method.ts","./src/oauth-endpoint-name.ts","./src/oauth-grant-type.ts","./src/oauth-introspection-response.ts","./src/oauth-issuer-identifier.ts","./src/oauth-par-response.ts","./src/oauth-password-grant-token-request.ts","./src/oauth-protected-resource-metadata.ts","./src/oauth-refresh-token-grant-token-request.ts","./src/oauth-refresh-token.ts","./src/oauth-request-uri.ts","./src/oauth-response-mode.ts","./src/oauth-response-type.ts","./src/oauth-scope.ts","./src/oauth-token-identification.ts","./src/oauth-token-request.ts","./src/oauth-token-response.ts","./src/oauth-token-type.ts","./src/oidc-claims-parameter.ts","./src/oidc-claims-properties.ts","./src/oidc-entity-type.ts","./src/util.ts"],"version":"5.6.3"}
|