@atcute/oauth-types 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +6 -5
  2. package/dist/build-client-metadata.d.ts +18 -160
  3. package/dist/build-client-metadata.d.ts.map +1 -1
  4. package/dist/build-client-metadata.js +73 -3
  5. package/dist/build-client-metadata.js.map +1 -1
  6. package/dist/index.d.ts +31 -30
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/schemas/atcute-client-shared.d.ts +8 -0
  11. package/dist/schemas/atcute-client-shared.d.ts.map +1 -0
  12. package/dist/schemas/atcute-client-shared.js +15 -0
  13. package/dist/schemas/atcute-client-shared.js.map +1 -0
  14. package/dist/schemas/atcute-confidential-client-metadata.d.ts +228 -4
  15. package/dist/schemas/atcute-confidential-client-metadata.d.ts.map +1 -1
  16. package/dist/schemas/atcute-confidential-client-metadata.js +48 -88
  17. package/dist/schemas/atcute-confidential-client-metadata.js.map +1 -1
  18. package/dist/schemas/atcute-public-client-metadata.d.ts +95 -0
  19. package/dist/schemas/atcute-public-client-metadata.d.ts.map +1 -0
  20. package/dist/schemas/atcute-public-client-metadata.js +74 -0
  21. package/dist/schemas/atcute-public-client-metadata.js.map +1 -0
  22. package/dist/schemas/atproto-authorization-server-metadata.d.ts +786 -4
  23. package/dist/schemas/atproto-authorization-server-metadata.d.ts.map +1 -1
  24. package/dist/schemas/atproto-authorization-server-metadata.js +2 -18
  25. package/dist/schemas/atproto-authorization-server-metadata.js.map +1 -1
  26. package/dist/schemas/atproto-oauth-scope.d.ts +3 -3
  27. package/dist/schemas/atproto-oauth-scope.d.ts.map +1 -1
  28. package/dist/schemas/atproto-oauth-scope.js +2 -2
  29. package/dist/schemas/atproto-oauth-scope.js.map +1 -1
  30. package/dist/schemas/atproto-oauth-token-response.d.ts +17 -17
  31. package/dist/schemas/atproto-oauth-token-response.d.ts.map +1 -1
  32. package/dist/schemas/atproto-oauth-token-response.js +6 -6
  33. package/dist/schemas/atproto-oauth-token-response.js.map +1 -1
  34. package/dist/schemas/atproto-protected-resource-metadata.d.ts +100 -4
  35. package/dist/schemas/atproto-protected-resource-metadata.d.ts.map +1 -1
  36. package/dist/schemas/atproto-protected-resource-metadata.js +2 -11
  37. package/dist/schemas/atproto-protected-resource-metadata.js.map +1 -1
  38. package/dist/schemas/jwk.d.ts +4289 -42
  39. package/dist/schemas/jwk.d.ts.map +1 -1
  40. package/dist/schemas/jwk.js +58 -91
  41. package/dist/schemas/jwk.js.map +1 -1
  42. package/dist/schemas/jwks.d.ts +87 -42
  43. package/dist/schemas/jwks.d.ts.map +1 -1
  44. package/dist/schemas/jwks.js +13 -29
  45. package/dist/schemas/jwks.js.map +1 -1
  46. package/dist/schemas/oauth-authorization-details.d.ts +18 -18
  47. package/dist/schemas/oauth-authorization-details.d.ts.map +1 -1
  48. package/dist/schemas/oauth-authorization-details.js +7 -7
  49. package/dist/schemas/oauth-authorization-details.js.map +1 -1
  50. package/dist/schemas/oauth-authorization-server-metadata.d.ts +462 -48
  51. package/dist/schemas/oauth-authorization-server-metadata.d.ts.map +1 -1
  52. package/dist/schemas/oauth-authorization-server-metadata.js +46 -65
  53. package/dist/schemas/oauth-authorization-server-metadata.js.map +1 -1
  54. package/dist/schemas/oauth-client-id-discoverable.d.ts +2 -2
  55. package/dist/schemas/oauth-client-id-discoverable.d.ts.map +1 -1
  56. package/dist/schemas/oauth-client-id-discoverable.js +20 -22
  57. package/dist/schemas/oauth-client-id-discoverable.js.map +1 -1
  58. package/dist/schemas/oauth-client-id.d.ts +3 -3
  59. package/dist/schemas/oauth-client-id.d.ts.map +1 -1
  60. package/dist/schemas/oauth-client-id.js +2 -2
  61. package/dist/schemas/oauth-client-id.js.map +1 -1
  62. package/dist/schemas/oauth-client-metadata.d.ts +73 -51
  63. package/dist/schemas/oauth-client-metadata.d.ts.map +1 -1
  64. package/dist/schemas/oauth-client-metadata.js +33 -40
  65. package/dist/schemas/oauth-client-metadata.js.map +1 -1
  66. package/dist/schemas/oauth-code-challenge-method.d.ts +3 -3
  67. package/dist/schemas/oauth-code-challenge-method.d.ts.map +1 -1
  68. package/dist/schemas/oauth-code-challenge-method.js +2 -2
  69. package/dist/schemas/oauth-code-challenge-method.js.map +1 -1
  70. package/dist/schemas/oauth-endpoint-auth-method.d.ts +3 -3
  71. package/dist/schemas/oauth-endpoint-auth-method.d.ts.map +1 -1
  72. package/dist/schemas/oauth-endpoint-auth-method.js +10 -2
  73. package/dist/schemas/oauth-endpoint-auth-method.js.map +1 -1
  74. package/dist/schemas/oauth-grant-type.d.ts +3 -3
  75. package/dist/schemas/oauth-grant-type.d.ts.map +1 -1
  76. package/dist/schemas/oauth-grant-type.js +10 -3
  77. package/dist/schemas/oauth-grant-type.js.map +1 -1
  78. package/dist/schemas/oauth-issuer-identifier.d.ts +3 -3
  79. package/dist/schemas/oauth-issuer-identifier.d.ts.map +1 -1
  80. package/dist/schemas/oauth-issuer-identifier.js +16 -9
  81. package/dist/schemas/oauth-issuer-identifier.js.map +1 -1
  82. package/dist/schemas/oauth-par-response.d.ts +5 -5
  83. package/dist/schemas/oauth-par-response.d.ts.map +1 -1
  84. package/dist/schemas/oauth-par-response.js +3 -3
  85. package/dist/schemas/oauth-par-response.js.map +1 -1
  86. package/dist/schemas/oauth-prompt.d.ts +3 -3
  87. package/dist/schemas/oauth-prompt.d.ts.map +1 -1
  88. package/dist/schemas/oauth-prompt.js +2 -2
  89. package/dist/schemas/oauth-prompt.js.map +1 -1
  90. package/dist/schemas/oauth-protected-resource-metadata.d.ts +88 -16
  91. package/dist/schemas/oauth-protected-resource-metadata.d.ts.map +1 -1
  92. package/dist/schemas/oauth-protected-resource-metadata.js +14 -26
  93. package/dist/schemas/oauth-protected-resource-metadata.js.map +1 -1
  94. package/dist/schemas/oauth-redirect-uri.d.ts +5 -5
  95. package/dist/schemas/oauth-redirect-uri.d.ts.map +1 -1
  96. package/dist/schemas/oauth-redirect-uri.js +3 -16
  97. package/dist/schemas/oauth-redirect-uri.js.map +1 -1
  98. package/dist/schemas/oauth-response-mode.d.ts +3 -3
  99. package/dist/schemas/oauth-response-mode.d.ts.map +1 -1
  100. package/dist/schemas/oauth-response-mode.js +2 -2
  101. package/dist/schemas/oauth-response-mode.js.map +1 -1
  102. package/dist/schemas/oauth-response-type.d.ts +3 -3
  103. package/dist/schemas/oauth-response-type.d.ts.map +1 -1
  104. package/dist/schemas/oauth-response-type.js +13 -7
  105. package/dist/schemas/oauth-response-type.js.map +1 -1
  106. package/dist/schemas/oauth-scope.d.ts +3 -3
  107. package/dist/schemas/oauth-scope.d.ts.map +1 -1
  108. package/dist/schemas/oauth-scope.js +2 -2
  109. package/dist/schemas/oauth-scope.js.map +1 -1
  110. package/dist/schemas/oauth-token-response.d.ts +17 -17
  111. package/dist/schemas/oauth-token-response.d.ts.map +1 -1
  112. package/dist/schemas/oauth-token-response.js +7 -7
  113. package/dist/schemas/oauth-token-response.js.map +1 -1
  114. package/dist/schemas/oauth-token-type.d.ts +3 -3
  115. package/dist/schemas/oauth-token-type.d.ts.map +1 -1
  116. package/dist/schemas/oauth-token-type.js +8 -7
  117. package/dist/schemas/oauth-token-type.js.map +1 -1
  118. package/dist/schemas/uri.d.ts +7 -7
  119. package/dist/schemas/uri.d.ts.map +1 -1
  120. package/dist/schemas/uri.js +44 -44
  121. package/dist/schemas/uri.js.map +1 -1
  122. package/dist/schemas/utils.d.ts.map +1 -1
  123. package/dist/schemas/utils.js.map +1 -1
  124. package/dist/scope.d.ts.map +1 -1
  125. package/dist/scope.js.map +1 -1
  126. package/lib/build-client-metadata.ts +92 -6
  127. package/lib/index.ts +38 -30
  128. package/lib/schemas/atcute-client-shared.ts +25 -0
  129. package/lib/schemas/atcute-confidential-client-metadata.ts +81 -111
  130. package/lib/schemas/atcute-public-client-metadata.ts +101 -0
  131. package/lib/schemas/atproto-authorization-server-metadata.ts +22 -23
  132. package/lib/schemas/atproto-oauth-scope.ts +8 -5
  133. package/lib/schemas/atproto-oauth-token-response.ts +10 -9
  134. package/lib/schemas/atproto-protected-resource-metadata.ts +15 -15
  135. package/lib/schemas/jwk.ts +104 -120
  136. package/lib/schemas/jwks.ts +28 -40
  137. package/lib/schemas/oauth-authorization-details.ts +10 -10
  138. package/lib/schemas/oauth-authorization-server-metadata.ts +72 -74
  139. package/lib/schemas/oauth-client-id-discoverable.ts +43 -48
  140. package/lib/schemas/oauth-client-id.ts +3 -3
  141. package/lib/schemas/oauth-client-metadata.ts +45 -49
  142. package/lib/schemas/oauth-code-challenge-method.ts +3 -3
  143. package/lib/schemas/oauth-endpoint-auth-method.ts +11 -11
  144. package/lib/schemas/oauth-grant-type.ts +11 -11
  145. package/lib/schemas/oauth-issuer-identifier.ts +35 -27
  146. package/lib/schemas/oauth-par-response.ts +4 -4
  147. package/lib/schemas/oauth-prompt.ts +3 -9
  148. package/lib/schemas/oauth-protected-resource-metadata.ts +26 -35
  149. package/lib/schemas/oauth-redirect-uri.ts +15 -23
  150. package/lib/schemas/oauth-response-mode.ts +3 -7
  151. package/lib/schemas/oauth-response-type.ts +12 -12
  152. package/lib/schemas/oauth-scope.ts +3 -3
  153. package/lib/schemas/oauth-token-response.ts +10 -10
  154. package/lib/schemas/oauth-token-type.ts +16 -12
  155. package/lib/schemas/uri.ts +89 -76
  156. package/package.json +9 -8
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
1
+ import * as v from 'valibot';
2
2
  import { jwksPubSchema } from './jwks.js';
3
3
  import { oauthClientIdSchema } from './oauth-client-id.js';
4
4
  import { oauthEndpointAuthMethodSchema } from './oauth-endpoint-auth-method.js';
@@ -7,8 +7,8 @@ import { oauthRedirectUriSchema } from './oauth-redirect-uri.js';
7
7
  import { oauthResponseTypeSchema } from './oauth-response-type.js';
8
8
  import { oauthScopeSchema } from './oauth-scope.js';
9
9
  import { webUriSchema } from './uri.js';
10
- const oauthApplicationTypeSchema = v.union(v.literal('web'), v.literal('native'));
11
- const oauthSubjectTypeSchema = v.union(v.literal('public'), v.literal('pairwise'));
10
+ const oauthApplicationTypeSchema = v.picklist(['web', 'native']);
11
+ const oauthSubjectTypeSchema = v.picklist(['public', 'pairwise']);
12
12
  // simple email validation
13
13
  const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
14
14
  /**
@@ -17,44 +17,37 @@ const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
17
17
  * @see {@link https://openid.net/specs/openid-connect-registration-1_0.html}
18
18
  * @see {@link https://datatracker.ietf.org/doc/html/rfc7591}
19
19
  */
20
- export const oauthClientMetadataSchema = v.object({
20
+ export const oauthClientMetadataSchema = v.looseObject({
21
21
  // https://www.rfc-editor.org/rfc/rfc7591.html#section-2
22
- redirect_uris: v
23
- .array(oauthRedirectUriSchema)
24
- .assert((arr) => arr.length > 0, `must have at least one redirect URI`),
25
- response_types: v.array(oauthResponseTypeSchema).optional(),
22
+ redirect_uris: v.pipe(v.array(oauthRedirectUriSchema), v.minLength(1, `must have at least one redirect URI`)),
23
+ response_types: v.optional(v.array(oauthResponseTypeSchema)),
26
24
  // > If omitted, the default is that the client will use only the "code"
27
25
  // > response type.
28
- // .optional((): OAuthResponseType[] => ['code'])
29
- grant_types: v.array(oauthGrantTypeSchema).optional(),
26
+ grant_types: v.optional(v.array(oauthGrantTypeSchema)),
30
27
  // > If omitted, the default behavior is that the client will use only the
31
28
  // > "authorization_code" Grant Type.
32
- // .optional((): OAuthGrantType[] => ['authorization_code']),
33
- scope: oauthScopeSchema.optional(),
29
+ scope: v.optional(oauthScopeSchema),
34
30
  // https://www.rfc-editor.org/rfc/rfc7591.html#section-2
35
- token_endpoint_auth_method: oauthEndpointAuthMethodSchema.optional(),
31
+ token_endpoint_auth_method: v.optional(oauthEndpointAuthMethodSchema),
36
32
  // > If unspecified or omitted, the default is "client_secret_basic" [...].
37
- // .optional((): OAuthEndpointAuthMethod => 'client_secret_basic'),
38
- token_endpoint_auth_signing_alg: v.string().optional(),
39
- userinfo_signed_response_alg: v.string().optional(),
40
- userinfo_encrypted_response_alg: v.string().optional(),
41
- jwks_uri: webUriSchema.optional(),
42
- jwks: jwksPubSchema.optional(),
43
- application_type: oauthApplicationTypeSchema.optional(),
44
- // .optional((): OAuthApplicationType => 'web'),
45
- subject_type: oauthSubjectTypeSchema.optional(),
46
- // .optional((): OAuthSubjectType => 'public'),
47
- request_object_signing_alg: v.string().optional(),
48
- id_token_signed_response_alg: v.string().optional(),
49
- authorization_signed_response_alg: v.string().optional(),
50
- authorization_encrypted_response_enc: v.literal('A128CBC-HS256').optional(),
51
- authorization_encrypted_response_alg: v.string().optional(),
52
- client_id: oauthClientIdSchema.optional(),
53
- client_name: v.string().optional(),
54
- client_uri: webUriSchema.optional(),
55
- policy_uri: webUriSchema.optional(),
56
- tos_uri: webUriSchema.optional(),
57
- logo_uri: webUriSchema.optional(),
33
+ token_endpoint_auth_signing_alg: v.optional(v.string()),
34
+ userinfo_signed_response_alg: v.optional(v.string()),
35
+ userinfo_encrypted_response_alg: v.optional(v.string()),
36
+ jwks_uri: v.optional(webUriSchema),
37
+ jwks: v.optional(jwksPubSchema),
38
+ application_type: v.optional(oauthApplicationTypeSchema),
39
+ subject_type: v.optional(oauthSubjectTypeSchema),
40
+ request_object_signing_alg: v.optional(v.string()),
41
+ id_token_signed_response_alg: v.optional(v.string()),
42
+ authorization_signed_response_alg: v.optional(v.string()),
43
+ authorization_encrypted_response_enc: v.optional(v.literal('A128CBC-HS256')),
44
+ authorization_encrypted_response_alg: v.optional(v.string()),
45
+ client_id: v.optional(oauthClientIdSchema),
46
+ client_name: v.optional(v.string()),
47
+ client_uri: v.optional(webUriSchema),
48
+ policy_uri: v.optional(webUriSchema),
49
+ tos_uri: v.optional(webUriSchema),
50
+ logo_uri: v.optional(webUriSchema),
58
51
  /**
59
52
  * default Maximum Authentication Age. specifies that the End-User MUST be
60
53
  * actively authenticated if the End-User was authenticated longer ago than
@@ -62,13 +55,13 @@ export const oauthClientMetadataSchema = v.object({
62
55
  * this default value. if omitted, no default Maximum Authentication Age is
63
56
  * specified.
64
57
  */
65
- default_max_age: v.number().optional(),
66
- require_auth_time: v.boolean().optional(),
67
- contacts: v.array(v.string().assert((s) => EMAIL_RE.test(s), `must be a valid email`)).optional(),
68
- tls_client_certificate_bound_access_tokens: v.boolean().optional(),
58
+ default_max_age: v.optional(v.number()),
59
+ require_auth_time: v.optional(v.boolean()),
60
+ contacts: v.optional(v.array(v.pipe(v.string(), v.regex(EMAIL_RE, `must be a valid email`)))),
61
+ tls_client_certificate_bound_access_tokens: v.optional(v.boolean()),
69
62
  // https://datatracker.ietf.org/doc/html/rfc9449#section-5.2
70
- dpop_bound_access_tokens: v.boolean().optional(),
63
+ dpop_bound_access_tokens: v.optional(v.boolean()),
71
64
  // https://datatracker.ietf.org/doc/html/rfc9396#section-14.5
72
- authorization_details_types: v.array(v.string()).optional(),
65
+ authorization_details_types: v.optional(v.array(v.string())),
73
66
  });
74
67
  //# sourceMappingURL=oauth-client-metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-client-metadata.js","sourceRoot":"","sources":["../../lib/schemas/oauth-client-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC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CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;IAElC;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAC7F,0CAA0C,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAEnE,4DAA4D;IAC5D,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAEjD,6DAA6D;IAC7D,2BAA2B,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC5D,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthCodeChallengeMethodSchema: v.UnionType<[v.Type<"S256">, v.Type<"plain">]>;
3
- export type OAuthCodeChallengeMethod = v.Infer<typeof oauthCodeChallengeMethodSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthCodeChallengeMethodSchema: v.PicklistSchema<["S256", "plain"], undefined>;
3
+ export type OAuthCodeChallengeMethod = v.InferOutput<typeof oauthCodeChallengeMethodSchema>;
4
4
  //# sourceMappingURL=oauth-code-challenge-method.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-code-challenge-method.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-code-challenge-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,eAAO,MAAM,8BAA8B,gDAAiD,CAAC;AAE7F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-code-challenge-method.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-code-challenge-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,8BAA8B,gDAAgC,CAAC;AAE5E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import * as v from '@badrap/valita';
2
- export const oauthCodeChallengeMethodSchema = v.union(v.literal('S256'), v.literal('plain'));
1
+ import * as v from 'valibot';
2
+ export const oauthCodeChallengeMethodSchema = v.picklist(['S256', 'plain']);
3
3
  //# sourceMappingURL=oauth-code-challenge-method.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-code-challenge-method.js","sourceRoot":"","sources":["../../lib/schemas/oauth-code-challenge-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-code-challenge-method.js","sourceRoot":"","sources":["../../lib/schemas/oauth-code-challenge-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthEndpointAuthMethodSchema: v.UnionType<[v.Type<"client_secret_basic">, v.Type<"client_secret_jwt">, v.Type<"client_secret_post">, v.Type<"none">, v.Type<"private_key_jwt">, v.Type<"self_signed_tls_client_auth">, v.Type<"tls_client_auth">]>;
3
- export type OAuthEndpointAuthMethod = v.Infer<typeof oauthEndpointAuthMethodSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthEndpointAuthMethodSchema: v.PicklistSchema<["client_secret_basic", "client_secret_jwt", "client_secret_post", "none", "private_key_jwt", "self_signed_tls_client_auth", "tls_client_auth"], undefined>;
3
+ export type OAuthEndpointAuthMethod = v.InferOutput<typeof oauthEndpointAuthMethodSchema>;
4
4
  //# sourceMappingURL=oauth-endpoint-auth-method.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-endpoint-auth-method.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-endpoint-auth-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,eAAO,MAAM,6BAA6B,sNAQzC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-endpoint-auth-method.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-endpoint-auth-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,6BAA6B,8KAQxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -1,3 +1,11 @@
1
- import * as v from '@badrap/valita';
2
- export const oauthEndpointAuthMethodSchema = v.union(v.literal('client_secret_basic'), v.literal('client_secret_jwt'), v.literal('client_secret_post'), v.literal('none'), v.literal('private_key_jwt'), v.literal('self_signed_tls_client_auth'), v.literal('tls_client_auth'));
1
+ import * as v from 'valibot';
2
+ export const oauthEndpointAuthMethodSchema = v.picklist([
3
+ 'client_secret_basic',
4
+ 'client_secret_jwt',
5
+ 'client_secret_post',
6
+ 'none',
7
+ 'private_key_jwt',
8
+ 'self_signed_tls_client_auth',
9
+ 'tls_client_auth',
10
+ ]);
3
11
  //# sourceMappingURL=oauth-endpoint-auth-method.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-endpoint-auth-method.js","sourceRoot":"","sources":["../../lib/schemas/oauth-endpoint-auth-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACnD,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAChC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC9B,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC/B,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EACjB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAC5B,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,EACxC,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAC5B,CAAC"}
1
+ {"version":3,"file":"oauth-endpoint-auth-method.js","sourceRoot":"","sources":["../../lib/schemas/oauth-endpoint-auth-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,QAAQ,CAAC;IACvD,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,MAAM;IACN,iBAAiB;IACjB,6BAA6B;IAC7B,iBAAiB;CACjB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthGrantTypeSchema: v.UnionType<[v.Type<"authorization_code">, v.Type<"implicit">, v.Type<"refresh_token">, v.Type<"password">, v.Type<"client_credentials">, v.Type<"urn:ietf:params:oauth:grant-type:jwt-bearer">, v.Type<"urn:ietf:params:oauth:grant-type:saml2-bearer">]>;
3
- export type OAuthGrantType = v.Infer<typeof oauthGrantTypeSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthGrantTypeSchema: v.PicklistSchema<["authorization_code", "implicit", "refresh_token", "password", "client_credentials", "urn:ietf:params:oauth:grant-type:jwt-bearer", "urn:ietf:params:oauth:grant-type:saml2-bearer"], undefined>;
3
+ export type OAuthGrantType = v.InferOutput<typeof oauthGrantTypeSchema>;
4
4
  //# sourceMappingURL=oauth-grant-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-grant-type.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-grant-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,eAAO,MAAM,oBAAoB,4PAQhC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-grant-type.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-grant-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,oBAAoB,oNAQ/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,4 +1,11 @@
1
- import * as v from '@badrap/valita';
2
- export const oauthGrantTypeSchema = v.union(v.literal('authorization_code'), v.literal('implicit'), v.literal('refresh_token'), v.literal('password'), // not part of OAuth 2.1
3
- v.literal('client_credentials'), v.literal('urn:ietf:params:oauth:grant-type:jwt-bearer'), v.literal('urn:ietf:params:oauth:grant-type:saml2-bearer'));
1
+ import * as v from 'valibot';
2
+ export const oauthGrantTypeSchema = v.picklist([
3
+ 'authorization_code',
4
+ 'implicit',
5
+ 'refresh_token',
6
+ 'password', // not part of OAuth 2.1
7
+ 'client_credentials',
8
+ 'urn:ietf:params:oauth:grant-type:jwt-bearer',
9
+ 'urn:ietf:params:oauth:grant-type:saml2-bearer',
10
+ ]);
4
11
  //# sourceMappingURL=oauth-grant-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-grant-type.js","sourceRoot":"","sources":["../../lib/schemas/oauth-grant-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAC1C,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC/B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,EAC1B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,wBAAwB;AAC/C,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC/B,CAAC,CAAC,OAAO,CAAC,6CAA6C,CAAC,EACxD,CAAC,CAAC,OAAO,CAAC,+CAA+C,CAAC,CAC1D,CAAC"}
1
+ {"version":3,"file":"oauth-grant-type.js","sourceRoot":"","sources":["../../lib/schemas/oauth-grant-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC9C,oBAAoB;IACpB,UAAU;IACV,eAAe;IACf,UAAU,EAAE,wBAAwB;IACpC,oBAAoB;IACpB,6CAA6C;IAC7C,+CAA+C;CAC/C,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthIssuerIdentifierSchema: v.Type<string>;
3
- export type OAuthIssuerIdentifier = v.Infer<typeof oauthIssuerIdentifierSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthIssuerIdentifierSchema: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, v.RawCheckAction<string>]>;
3
+ export type OAuthIssuerIdentifier = v.InferOutput<typeof oauthIssuerIdentifierSchema>;
4
4
  //# sourceMappingURL=oauth-issuer-identifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-issuer-identifier.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-issuer-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAIpC,eAAO,MAAM,2BAA2B,gBAuBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-issuer-identifier.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-issuer-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,2BAA2B,2aA+BvC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,21 +1,28 @@
1
- import * as v from '@badrap/valita';
1
+ import * as v from 'valibot';
2
2
  import { webUriSchema } from './uri.js';
3
- export const oauthIssuerIdentifierSchema = webUriSchema.chain((input) => {
4
- // validate the issuer (MIX-UP attacks)
3
+ export const oauthIssuerIdentifierSchema = v.pipe(webUriSchema,
4
+ // validate the issuer (MIX-UP attacks)
5
+ v.rawCheck(({ dataset, addIssue }) => {
6
+ if (!dataset.typed) {
7
+ return;
8
+ }
9
+ const input = dataset.value;
5
10
  if (input.endsWith('/')) {
6
- return v.err(`issuer URL must not end with a slash`);
11
+ addIssue({ message: `issuer URL must not end with a slash` });
12
+ return;
7
13
  }
8
14
  const url = new URL(input);
9
15
  if (url.username || url.password) {
10
- return v.err(`issuer URL must not contain a username or password`);
16
+ addIssue({ message: `issuer URL must not contain a username or password` });
17
+ return;
11
18
  }
12
19
  if (url.hash || url.search) {
13
- return v.err(`issuer URL must not contain a query or fragment`);
20
+ addIssue({ message: `issuer URL must not contain a query or fragment` });
21
+ return;
14
22
  }
15
23
  const canonicalValue = url.pathname === '/' ? url.origin : url.href;
16
24
  if (input !== canonicalValue) {
17
- return v.err(`issuer URL must be in the canonical form`);
25
+ addIssue({ message: `issuer URL must be in the canonical form` });
18
26
  }
19
- return v.ok(input);
20
- });
27
+ }));
21
28
  //# sourceMappingURL=oauth-issuer-identifier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-issuer-identifier.js","sourceRoot":"","sources":["../../lib/schemas/oauth-issuer-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IACxE,uCAAuC;IAEvC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAE3B,IAAI,GAAG,C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C,KAAK,CAAC,CAAC;IAE3B,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClC,QAAQ,CAAC,EAAE,OAAO,EAAE,oDAAoD,EAAE,CAAC,CAAC;QAC5E,OAAO;IACR,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC5B,QAAQ,CAAC,EAAE,OAAO,EAAE,iDAAiD,EAAE,CAAC,CAAC;QACzE,OAAO;IACR,CAAC;IAED,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACpE,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,EAAE,0CAA0C,EAAE,CAAC,CAAC;IACnE,CAAC;AACF,CAAC,CAAC,CACF,CAAC"}
@@ -1,7 +1,7 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthParResponseSchema: v.ObjectType<{
3
- request_uri: v.Type<string>;
4
- expires_in: v.Type<number>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthParResponseSchema: v.LooseObjectSchema<{
3
+ readonly request_uri: v.StringSchema<undefined>;
4
+ readonly expires_in: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.CheckAction<number, "must be a positive integer">]>;
5
5
  }, undefined>;
6
- export type OAuthParResponse = v.Infer<typeof oauthParResponseSchema>;
6
+ export type OAuthParResponse = v.InferOutput<typeof oauthParResponseSchema>;
7
7
  //# sourceMappingURL=oauth-par-response.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-par-response.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-par-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAIpC,eAAO,MAAM,sBAAsB;;;aAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-par-response.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-par-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,sBAAsB;;;aAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import * as v from '@badrap/valita';
1
+ import * as v from 'valibot';
2
2
  const isPositiveInteger = (n) => Number.isInteger(n) && n > 0;
3
- export const oauthParResponseSchema = v.object({
3
+ export const oauthParResponseSchema = v.looseObject({
4
4
  request_uri: v.string(),
5
- expires_in: v.number().assert(isPositiveInteger, `must be a positive integer`),
5
+ expires_in: v.pipe(v.number(), v.check(isPositiveInteger, `must be a positive integer`)),
6
6
  });
7
7
  //# sourceMappingURL=oauth-par-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-par-response.js","sourceRoot":"","sources":["../../lib/schemas/oauth-par-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,CAAC;CAC9E,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-par-response.js","sourceRoot":"","sources":["../../lib/schemas/oauth-par-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC;IACnD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,EAAE,4BAA4B,CAAC,CAAC;CACxF,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
1
+ import * as v from 'valibot';
2
2
  /**
3
3
  * OAuth prompt mode values.
4
4
  *
@@ -8,6 +8,6 @@ import * as v from '@badrap/valita';
8
8
  * - `select_account`: force account selection
9
9
  * - `create`: force user registration screen
10
10
  */
11
- export declare const oauthPromptSchema: v.UnionType<[v.Type<"none">, v.Type<"login">, v.Type<"consent">, v.Type<"select_account">, v.Type<"create">]>;
12
- export type OAuthPrompt = v.Infer<typeof oauthPromptSchema>;
11
+ export declare const oauthPromptSchema: v.PicklistSchema<["none", "login", "consent", "select_account", "create"], undefined>;
12
+ export type OAuthPrompt = v.InferOutput<typeof oauthPromptSchema>;
13
13
  //# sourceMappingURL=oauth-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-prompt.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,+GAM7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-prompt.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,uFAAuE,CAAC;AAEtG,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import * as v from '@badrap/valita';
1
+ import * as v from 'valibot';
2
2
  /**
3
3
  * OAuth prompt mode values.
4
4
  *
@@ -8,5 +8,5 @@ import * as v from '@badrap/valita';
8
8
  * - `select_account`: force account selection
9
9
  * - `create`: force user registration screen
10
10
  */
11
- export const oauthPromptSchema = v.union(v.literal('none'), v.literal('login'), v.literal('consent'), v.literal('select_account'), v.literal('create'));
11
+ export const oauthPromptSchema = v.picklist(['none', 'login', 'consent', 'select_account', 'create']);
12
12
  //# sourceMappingURL=oauth-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-prompt.js","sourceRoot":"","sources":["../../lib/schemas/oauth-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACvC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EACjB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAClB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CACnB,CAAC"}
1
+ {"version":3,"file":"oauth-prompt.js","sourceRoot":"","sources":["../../lib/schemas/oauth-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC,CAAC"}
@@ -1,57 +1,127 @@
1
- import * as v from '@badrap/valita';
2
- export declare const oauthBearerMethodSchema: v.UnionType<[v.Type<"header">, v.Type<"body">, v.Type<"query">]>;
3
- export type OAuthBearerMethod = v.Infer<typeof oauthBearerMethodSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const oauthBearerMethodSchema: v.PicklistSchema<["header", "body", "query"], undefined>;
3
+ export type OAuthBearerMethod = v.InferOutput<typeof oauthBearerMethodSchema>;
4
4
  /**
5
5
  * @see {@link https://www.rfc-editor.org/rfc/rfc9728.html#section-3.2}
6
6
  */
7
- export declare const oauthProtectedResourceMetadataSchema: v.ObjectType<{
7
+ export declare const oauthProtectedResourceMetadataSchema: v.LooseObjectSchema<{
8
8
  /**
9
9
  * REQUIRED. the protected resource's resource identifier, which is a URL that
10
10
  * uses the https scheme and has no query or fragment components.
11
11
  */
12
- resource: v.Type<string>;
12
+ readonly resource: v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">;
13
13
  /**
14
14
  * OPTIONAL. JSON array containing a list of OAuth authorization server issuer
15
15
  * identifiers, as defined in RFC8414, for authorization servers that can be
16
16
  * used with this protected resource.
17
17
  */
18
- authorization_servers: v.Optional<string[]>;
18
+ readonly authorization_servers: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, v.RawCheckAction<string>]>, undefined>, undefined>;
19
19
  /**
20
20
  * OPTIONAL. URL of the protected resource's JWK Set document.
21
21
  */
22
- jwks_uri: v.Optional<string>;
22
+ readonly jwks_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
23
23
  /**
24
24
  * RECOMMENDED. JSON array containing a list of the OAuth 2.0 scope values that
25
25
  * are used in authorization requests to request access to this protected resource.
26
26
  */
27
- scopes_supported: v.Optional<string[]>;
27
+ readonly scopes_supported: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
28
28
  /**
29
29
  * OPTIONAL. JSON array containing a list of the supported methods of sending
30
30
  * an OAuth 2.0 Bearer Token to the protected resource.
31
31
  */
32
- bearer_methods_supported: v.Optional<("body" | "header" | "query")[]>;
32
+ readonly bearer_methods_supported: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["header", "body", "query"], undefined>, undefined>, undefined>;
33
33
  /**
34
34
  * OPTIONAL. JSON array containing a list of the JWS signing algorithms
35
35
  * supported by the protected resource for signing resource responses.
36
36
  */
37
- resource_signing_alg_values_supported: v.Optional<string[]>;
37
+ readonly resource_signing_alg_values_supported: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
38
38
  /**
39
39
  * OPTIONAL. URL of a page containing human-readable information that
40
40
  * developers might want or need to know when using the protected resource.
41
41
  */
42
- resource_documentation: v.Optional<string>;
42
+ readonly resource_documentation: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
43
43
  /**
44
44
  * OPTIONAL. URL that the protected resource provides to read about the
45
45
  * protected resource's requirements on how the client can use the data.
46
46
  */
47
- resource_policy_uri: v.Optional<string>;
47
+ readonly resource_policy_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
48
48
  /**
49
49
  * OPTIONAL. URL that the protected resource provides to read about the
50
50
  * protected resource's terms of service.
51
51
  */
52
- resource_tos_uri: v.Optional<string>;
52
+ readonly resource_tos_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
53
53
  }, undefined>;
54
- export declare const oauthProtectedResourceMetadataValidator: v.Type<{
54
+ export declare const oauthProtectedResourceMetadataValidator: v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
55
+ /**
56
+ * REQUIRED. the protected resource's resource identifier, which is a URL that
57
+ * uses the https scheme and has no query or fragment components.
58
+ */
59
+ readonly resource: v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">;
60
+ /**
61
+ * OPTIONAL. JSON array containing a list of OAuth authorization server issuer
62
+ * identifiers, as defined in RFC8414, for authorization servers that can be
63
+ * used with this protected resource.
64
+ */
65
+ readonly authorization_servers: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, v.RawCheckAction<string>]>, undefined>, undefined>;
66
+ /**
67
+ * OPTIONAL. URL of the protected resource's JWK Set document.
68
+ */
69
+ readonly jwks_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
70
+ /**
71
+ * RECOMMENDED. JSON array containing a list of the OAuth 2.0 scope values that
72
+ * are used in authorization requests to request access to this protected resource.
73
+ */
74
+ readonly scopes_supported: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
75
+ /**
76
+ * OPTIONAL. JSON array containing a list of the supported methods of sending
77
+ * an OAuth 2.0 Bearer Token to the protected resource.
78
+ */
79
+ readonly bearer_methods_supported: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["header", "body", "query"], undefined>, undefined>, undefined>;
80
+ /**
81
+ * OPTIONAL. JSON array containing a list of the JWS signing algorithms
82
+ * supported by the protected resource for signing resource responses.
83
+ */
84
+ readonly resource_signing_alg_values_supported: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
85
+ /**
86
+ * OPTIONAL. URL of a page containing human-readable information that
87
+ * developers might want or need to know when using the protected resource.
88
+ */
89
+ readonly resource_documentation: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
90
+ /**
91
+ * OPTIONAL. URL that the protected resource provides to read about the
92
+ * protected resource's requirements on how the client can use the data.
93
+ */
94
+ readonly resource_policy_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
95
+ /**
96
+ * OPTIONAL. URL that the protected resource provides to read about the
97
+ * protected resource's terms of service.
98
+ */
99
+ readonly resource_tos_uri: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "must be a valid url">]>, v.RawCheckAction<string>]>], "url must use http: or https: protocol">, undefined>;
100
+ }, undefined>, v.BaseValidation<{
101
+ resource: string;
102
+ authorization_servers?: string[] | undefined;
103
+ jwks_uri?: string | undefined;
104
+ scopes_supported?: string[] | undefined;
105
+ bearer_methods_supported?: ("body" | "header" | "query")[] | undefined;
106
+ resource_signing_alg_values_supported?: string[] | undefined;
107
+ resource_documentation?: string | undefined;
108
+ resource_policy_uri?: string | undefined;
109
+ resource_tos_uri?: string | undefined;
110
+ } & {
111
+ [key: string]: unknown;
112
+ }, {
113
+ resource: string;
114
+ authorization_servers?: string[] | undefined;
115
+ jwks_uri?: string | undefined;
116
+ scopes_supported?: string[] | undefined;
117
+ bearer_methods_supported?: ("body" | "header" | "query")[] | undefined;
118
+ resource_signing_alg_values_supported?: string[] | undefined;
119
+ resource_documentation?: string | undefined;
120
+ resource_policy_uri?: string | undefined;
121
+ resource_tos_uri?: string | undefined;
122
+ } & {
123
+ [key: string]: unknown;
124
+ }, v.CheckIssue<{
55
125
  resource: string;
56
126
  authorization_servers?: string[] | undefined;
57
127
  jwks_uri?: string | undefined;
@@ -61,6 +131,8 @@ export declare const oauthProtectedResourceMetadataValidator: v.Type<{
61
131
  resource_documentation?: string | undefined;
62
132
  resource_policy_uri?: string | undefined;
63
133
  resource_tos_uri?: string | undefined;
64
- }>;
65
- export type OAuthProtectedResourceMetadata = v.Infer<typeof oauthProtectedResourceMetadataSchema>;
134
+ } & {
135
+ [key: string]: unknown;
136
+ }>>]>;
137
+ export type OAuthProtectedResourceMetadata = v.InferOutput<typeof oauthProtectedResourceMetadataSchema>;
66
138
  //# sourceMappingURL=oauth-protected-resource-metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-protected-resource-metadata.d.ts","sourceRoot":"","sources":["../../lib/schemas/oauth-protected-resource-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAKpC,eAAO,MAAM,uBAAuB,kEAAsE,CAAC;AAE3G,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,oCAAoC;IAChD;;;OAGG;;IAGH;;;;OAIG;;IAGH;;O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