@atproto/oauth-types 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.txt +7 -0
  3. package/README.md +3 -0
  4. package/dist/access-token.d.ts +4 -0
  5. package/dist/access-token.d.ts.map +1 -0
  6. package/dist/access-token.js +6 -0
  7. package/dist/access-token.js.map +1 -0
  8. package/dist/atproto-loopback-client-metadata.d.ts +3 -0
  9. package/dist/atproto-loopback-client-metadata.d.ts.map +1 -0
  10. package/dist/atproto-loopback-client-metadata.js +26 -0
  11. package/dist/atproto-loopback-client-metadata.js.map +1 -0
  12. package/dist/constants.d.ts +3 -0
  13. package/dist/constants.d.ts.map +1 -0
  14. package/dist/constants.js +11 -0
  15. package/dist/constants.js.map +1 -0
  16. package/dist/index.d.ts +27 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +43 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/oauth-authentication-request-parameters.d.ts +128 -0
  21. package/dist/oauth-authentication-request-parameters.d.ts.map +1 -0
  22. package/dist/oauth-authentication-request-parameters.js +76 -0
  23. package/dist/oauth-authentication-request-parameters.js.map +1 -0
  24. package/dist/oauth-authorization-details.d.ts +54 -0
  25. package/dist/oauth-authorization-details.d.ts.map +1 -0
  26. package/dist/oauth-authorization-details.js +20 -0
  27. package/dist/oauth-authorization-details.js.map +1 -0
  28. package/dist/oauth-authorization-server-metadata.d.ts +428 -0
  29. package/dist/oauth-authorization-server-metadata.d.ts.map +1 -0
  30. package/dist/oauth-authorization-server-metadata.js +88 -0
  31. package/dist/oauth-authorization-server-metadata.js.map +1 -0
  32. package/dist/oauth-client-credentials.d.ts +66 -0
  33. package/dist/oauth-client-credentials.d.ts.map +1 -0
  34. package/dist/oauth-client-credentials.js +30 -0
  35. package/dist/oauth-client-credentials.js.map +1 -0
  36. package/dist/oauth-client-id-discoverable.d.ts +8 -0
  37. package/dist/oauth-client-id-discoverable.d.ts.map +1 -0
  38. package/dist/oauth-client-id-discoverable.js +48 -0
  39. package/dist/oauth-client-id-discoverable.js.map +1 -0
  40. package/dist/oauth-client-id-loopback.d.ts +5 -0
  41. package/dist/oauth-client-id-loopback.d.ts.map +1 -0
  42. package/dist/oauth-client-id-loopback.js +44 -0
  43. package/dist/oauth-client-id-loopback.js.map +1 -0
  44. package/dist/oauth-client-id-url.d.ts +3 -0
  45. package/dist/oauth-client-id-url.d.ts.map +1 -0
  46. package/dist/oauth-client-id-url.js +21 -0
  47. package/dist/oauth-client-id-url.js.map +1 -0
  48. package/dist/oauth-client-id.d.ts +4 -0
  49. package/dist/oauth-client-id.d.ts.map +1 -0
  50. package/dist/oauth-client-id.js +6 -0
  51. package/dist/oauth-client-id.js.map +1 -0
  52. package/dist/oauth-client-identification.d.ts +31 -0
  53. package/dist/oauth-client-identification.d.ts.map +1 -0
  54. package/dist/oauth-client-identification.js +12 -0
  55. package/dist/oauth-client-identification.js.map +1 -0
  56. package/dist/oauth-client-metadata.d.ts +1576 -0
  57. package/dist/oauth-client-metadata.d.ts.map +1 -0
  58. package/dist/oauth-client-metadata.js +70 -0
  59. package/dist/oauth-client-metadata.js.map +1 -0
  60. package/dist/oauth-endpoint-auth-method.d.ts +4 -0
  61. package/dist/oauth-endpoint-auth-method.d.ts.map +1 -0
  62. package/dist/oauth-endpoint-auth-method.js +14 -0
  63. package/dist/oauth-endpoint-auth-method.js.map +1 -0
  64. package/dist/oauth-endpoint-name.d.ts +2 -0
  65. package/dist/oauth-endpoint-name.d.ts.map +1 -0
  66. package/dist/oauth-endpoint-name.js +3 -0
  67. package/dist/oauth-endpoint-name.js.map +1 -0
  68. package/dist/oauth-grant-type.d.ts +4 -0
  69. package/dist/oauth-grant-type.d.ts.map +1 -0
  70. package/dist/oauth-grant-type.js +14 -0
  71. package/dist/oauth-grant-type.js.map +1 -0
  72. package/dist/oauth-issuer-identifier.d.ts +3 -0
  73. package/dist/oauth-issuer-identifier.d.ts.map +1 -0
  74. package/dist/oauth-issuer-identifier.js +59 -0
  75. package/dist/oauth-issuer-identifier.js.map +1 -0
  76. package/dist/oauth-par-response.d.ts +10 -0
  77. package/dist/oauth-par-response.d.ts.map +1 -0
  78. package/dist/oauth-par-response.js +8 -0
  79. package/dist/oauth-par-response.js.map +1 -0
  80. package/dist/oauth-protected-resource-metadata.d.ts +90 -0
  81. package/dist/oauth-protected-resource-metadata.d.ts.map +1 -0
  82. package/dist/oauth-protected-resource-metadata.js +75 -0
  83. package/dist/oauth-protected-resource-metadata.js.map +1 -0
  84. package/dist/oauth-response-mode.d.ts +4 -0
  85. package/dist/oauth-response-mode.d.ts.map +1 -0
  86. package/dist/oauth-response-mode.js +10 -0
  87. package/dist/oauth-response-mode.js.map +1 -0
  88. package/dist/oauth-response-type.d.ts +4 -0
  89. package/dist/oauth-response-type.d.ts.map +1 -0
  90. package/dist/oauth-response-type.js +17 -0
  91. package/dist/oauth-response-type.js.map +1 -0
  92. package/dist/oauth-token-response.d.ts +103 -0
  93. package/dist/oauth-token-response.d.ts.map +1 -0
  94. package/dist/oauth-token-response.js +26 -0
  95. package/dist/oauth-token-response.js.map +1 -0
  96. package/dist/oauth-token-type.d.ts +4 -0
  97. package/dist/oauth-token-type.d.ts.map +1 -0
  98. package/dist/oauth-token-type.js +16 -0
  99. package/dist/oauth-token-type.js.map +1 -0
  100. package/dist/oidc-claims-parameter.d.ts +4 -0
  101. package/dist/oidc-claims-parameter.d.ts.map +1 -0
  102. package/dist/oidc-claims-parameter.js +36 -0
  103. package/dist/oidc-claims-parameter.js.map +1 -0
  104. package/dist/oidc-claims-properties.d.ts +16 -0
  105. package/dist/oidc-claims-properties.d.ts.map +1 -0
  106. package/dist/oidc-claims-properties.js +11 -0
  107. package/dist/oidc-claims-properties.js.map +1 -0
  108. package/dist/oidc-entity-type.d.ts +4 -0
  109. package/dist/oidc-entity-type.d.ts.map +1 -0
  110. package/dist/oidc-entity-type.js +6 -0
  111. package/dist/oidc-entity-type.js.map +1 -0
  112. package/dist/util.d.ts +5 -0
  113. package/dist/util.d.ts.map +1 -0
  114. package/dist/util.js +23 -0
  115. package/dist/util.js.map +1 -0
  116. package/package.json +37 -0
  117. package/src/access-token.ts +4 -0
  118. package/src/atproto-loopback-client-metadata.ts +30 -0
  119. package/src/constants.ts +9 -0
  120. package/src/index.ts +27 -0
  121. package/src/oauth-authentication-request-parameters.ts +104 -0
  122. package/src/oauth-authorization-details.ts +28 -0
  123. package/src/oauth-authorization-server-metadata.ts +106 -0
  124. package/src/oauth-client-credentials.ts +34 -0
  125. package/src/oauth-client-id-discoverable.ts +66 -0
  126. package/src/oauth-client-id-loopback.ts +58 -0
  127. package/src/oauth-client-id-url.ts +25 -0
  128. package/src/oauth-client-id.ts +4 -0
  129. package/src/oauth-client-identification.ts +14 -0
  130. package/src/oauth-client-metadata.ts +75 -0
  131. package/src/oauth-endpoint-auth-method.ts +13 -0
  132. package/src/oauth-endpoint-name.ts +5 -0
  133. package/src/oauth-grant-type.ts +13 -0
  134. package/src/oauth-issuer-identifier.ts +61 -0
  135. package/src/oauth-par-response.ts +7 -0
  136. package/src/oauth-protected-resource-metadata.ts +85 -0
  137. package/src/oauth-response-mode.ts +9 -0
  138. package/src/oauth-response-type.ts +17 -0
  139. package/src/oauth-token-response.ts +29 -0
  140. package/src/oauth-token-type.ts +15 -0
  141. package/src/oidc-claims-parameter.ts +40 -0
  142. package/src/oidc-claims-properties.ts +11 -0
  143. package/src/oidc-entity-type.ts +5 -0
  144. package/src/util.ts +20 -0
  145. package/tsconfig.build.json +8 -0
  146. package/tsconfig.json +4 -0
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseOAuthDiscoverableClientId = exports.isOAuthClientIdDiscoverable = void 0;
4
+ const oauth_client_id_url_js_1 = require("./oauth-client-id-url.js");
5
+ const util_js_1 = require("./util.js");
6
+ function isOAuthClientIdDiscoverable(clientId) {
7
+ try {
8
+ parseOAuthDiscoverableClientId(clientId);
9
+ return true;
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
15
+ exports.isOAuthClientIdDiscoverable = isOAuthClientIdDiscoverable;
16
+ function parseOAuthDiscoverableClientId(clientId) {
17
+ const url = (0, oauth_client_id_url_js_1.parseOAuthClientIdUrl)(clientId);
18
+ // Optimization: cheap checks first
19
+ if (url.hostname === 'localhost') {
20
+ throw new TypeError('ClientID must not be a loopback hostname');
21
+ }
22
+ if (url.protocol !== 'https:') {
23
+ throw new TypeError('ClientID must use the "https:" protocol');
24
+ }
25
+ if (url.hash) {
26
+ throw new TypeError('ClientID must not contain a fragment');
27
+ }
28
+ if (url.username || url.password) {
29
+ throw new TypeError('ClientID must not contain credentials');
30
+ }
31
+ if (url.pathname === '/') {
32
+ throw new TypeError('ClientID must contain a path (e.g. "/client-metadata")');
33
+ }
34
+ if (url.pathname !== '/' && url.pathname.endsWith('/')) {
35
+ throw new TypeError('ClientID must not end with a trailing slash');
36
+ }
37
+ if (url.pathname.includes('//')) {
38
+ throw new TypeError(`ClientID must not contain any double slashes in its path`);
39
+ }
40
+ // Note: Query string is allowed
41
+ // Note: no restriction on the port for non-loopback URIs
42
+ if ((0, util_js_1.isIP)(url.hostname)) {
43
+ throw new TypeError('ClientID must not be an IP address');
44
+ }
45
+ return url;
46
+ }
47
+ exports.parseOAuthDiscoverableClientId = parseOAuthDiscoverableClientId;
48
+ //# sourceMappingURL=oauth-client-id-discoverable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id-discoverable.js","sourceRoot":"","sources":["../src/oauth-client-id-discoverable.ts"],"names":[],"mappings":";;;AAAA,qEAAgE;AAEhE,uCAAgC;AAOhC,SAAgB,2BAA2B,CACzC,QAAW;IAEX,IAAI,CAAC;QACH,8BAA8B,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AATD,kEASC;AAED,SAAgB,8BAA8B,CAAC,QAAuB;IACpE,MAAM,GAAG,GAAG,IAAA,8CAAqB,EAAC,QAAQ,CAAC,CAAA;IAE3C,mCAAmC;IAEnC,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAA;IACjE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAA;IAChE,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAA;IAC9D,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CACjB,wDAAwD,CACzD,CAAA;IACH,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAA;IACpE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CACjB,0DAA0D,CAC3D,CAAA;IACH,CAAC;IAED,gCAAgC;IAChC,yDAAyD;IAEzD,IAAI,IAAA,cAAI,EAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,SAAS,CAAC,oCAAoC,CAAC,CAAA;IAC3D,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC;AA7CD,wEA6CC"}
@@ -0,0 +1,5 @@
1
+ import { OAuthClientId } from './oauth-client-id.js';
2
+ export type OAuthClientIdLoopback = OAuthClientId & `http://localhost${'' | `${'/' | '?' | '#'}${string}`}`;
3
+ export declare function isOAuthClientIdLoopback<C extends OAuthClientId>(clientId: C): clientId is C & OAuthClientIdLoopback;
4
+ export declare function parseOAuthLoopbackClientId(clientId: OAuthClientId): URL;
5
+ //# sourceMappingURL=oauth-client-id-loopback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id-loopback.d.ts","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAC/C,mBAAmB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,EAAE,EAAE,CAAA;AAEzD,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,aAAa,EAC7D,QAAQ,EAAE,CAAC,GACV,QAAQ,IAAI,CAAC,GAAG,qBAAqB,CAOvC;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,aAAa,GAAG,GAAG,CAwCvE"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseOAuthLoopbackClientId = exports.isOAuthClientIdLoopback = void 0;
4
+ const oauth_client_id_url_js_1 = require("./oauth-client-id-url.js");
5
+ function isOAuthClientIdLoopback(clientId) {
6
+ try {
7
+ parseOAuthLoopbackClientId(clientId);
8
+ return true;
9
+ }
10
+ catch {
11
+ return false;
12
+ }
13
+ }
14
+ exports.isOAuthClientIdLoopback = isOAuthClientIdLoopback;
15
+ function parseOAuthLoopbackClientId(clientId) {
16
+ const url = (0, oauth_client_id_url_js_1.parseOAuthClientIdUrl)(clientId);
17
+ // Optimization: cheap checks first
18
+ if (url.protocol !== 'http:') {
19
+ throw new TypeError('Loopback ClientID must use the "http:" protocol');
20
+ }
21
+ if (url.hostname !== 'localhost') {
22
+ throw new TypeError('Loopback ClientID must use the "localhost" hostname');
23
+ }
24
+ if (url.hash) {
25
+ throw new TypeError('Loopback ClientID must not contain a fragment');
26
+ }
27
+ if (url.username || url.password) {
28
+ throw new TypeError('Loopback ClientID must not contain credentials');
29
+ }
30
+ if (url.port) {
31
+ throw new TypeError('Loopback ClientID must not contain a port');
32
+ }
33
+ // Note: url.pathname === '/' is allowed for loopback URIs
34
+ if (url.pathname !== '/' && url.pathname.endsWith('/')) {
35
+ throw new TypeError('Loopback ClientID must not end with a trailing slash');
36
+ }
37
+ if (url.pathname.includes('//')) {
38
+ throw new TypeError(`Loopback ClientID must not contain any double slashes in its path`);
39
+ }
40
+ // Note: Query string is allowed
41
+ return url;
42
+ }
43
+ exports.parseOAuthLoopbackClientId = parseOAuthLoopbackClientId;
44
+ //# sourceMappingURL=oauth-client-id-loopback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id-loopback.js","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":";;;AAAA,qEAAgE;AAMhE,SAAgB,uBAAuB,CACrC,QAAW;IAEX,IAAI,CAAC;QACH,0BAA0B,CAAC,QAAQ,CAAC,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AATD,0DASC;AAED,SAAgB,0BAA0B,CAAC,QAAuB;IAChE,MAAM,GAAG,GAAG,IAAA,8CAAqB,EAAC,QAAQ,CAAC,CAAA;IAE3C,mCAAmC;IAEnC,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,SAAS,CAAC,iDAAiD,CAAC,CAAA;IACxE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,qDAAqD,CAAC,CAAA;IAC5E,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;IACtE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,gDAAgD,CAAC,CAAA;IACvE,CAAC;IAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,IAAI,SAAS,CAAC,2CAA2C,CAAC,CAAA;IAClE,CAAC;IAED,0DAA0D;IAE1D,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,SAAS,CAAC,sDAAsD,CAAC,CAAA;IAC7E,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CACjB,mEAAmE,CACpE,CAAA;IACH,CAAC;IAED,gCAAgC;IAEhC,OAAO,GAAG,CAAA;AACZ,CAAC;AAxCD,gEAwCC"}
@@ -0,0 +1,3 @@
1
+ import { OAuthClientId } from './oauth-client-id.js';
2
+ export declare function parseOAuthClientIdUrl(clientId: OAuthClientId): URL;
3
+ //# sourceMappingURL=oauth-client-id-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id-url.d.ts","sourceRoot":"","sources":["../src/oauth-client-id-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,GAAG,CAsBlE"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseOAuthClientIdUrl = void 0;
4
+ function parseOAuthClientIdUrl(clientId) {
5
+ if (clientId.endsWith('/')) {
6
+ throw new TypeError('ClientID must not end with a trailing slash');
7
+ }
8
+ const url = new URL(clientId);
9
+ if (url.protocol !== 'https:' && url.protocol !== 'http:') {
10
+ throw new TypeError('ClientID must use the "https:" or "http:" protocol');
11
+ }
12
+ url.searchParams.sort();
13
+ // URL constructor normalizes the URL, so we need to compare the canonical form
14
+ const canonicalUri = url.pathname === '/' ? url.origin + url.search : url.href;
15
+ if (canonicalUri !== clientId) {
16
+ throw new TypeError(`ClientID must be in canonical form ("${canonicalUri}", got "${clientId}")`);
17
+ }
18
+ return url;
19
+ }
20
+ exports.parseOAuthClientIdUrl = parseOAuthClientIdUrl;
21
+ //# sourceMappingURL=oauth-client-id-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id-url.js","sourceRoot":"","sources":["../src/oauth-client-id-url.ts"],"names":[],"mappings":";;;AAEA,SAAgB,qBAAqB,CAAC,QAAuB;IAC3D,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAA;IACpE,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;IAE7B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1D,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC,CAAA;IAC3E,CAAC;IAED,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAEvB,+EAA+E;IAC/E,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAA;IAC9E,IAAI,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CACjB,wCAAwC,YAAY,WAAW,QAAQ,IAAI,CAC5E,CAAA;IACH,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC;AAtBD,sDAsBC"}
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const oauthClientIdSchema: z.ZodString;
3
+ export type OAuthClientId = z.infer<typeof oauthClientIdSchema>;
4
+ //# sourceMappingURL=oauth-client-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id.d.ts","sourceRoot":"","sources":["../src/oauth-client-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB,aAAoB,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.oauthClientIdSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.oauthClientIdSchema = zod_1.z.string().min(1);
6
+ //# sourceMappingURL=oauth-client-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-id.js","sourceRoot":"","sources":["../src/oauth-client-id.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEV,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const oauthClientIdentificationSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
3
+ client_id: z.ZodString;
4
+ client_assertion_type: z.ZodLiteral<"urn:ietf:params:oauth:client-assertion-type:jwt-bearer">;
5
+ client_assertion: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, `${string}.${string}.${string}`, string>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ client_id: string;
8
+ client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
9
+ client_assertion: `${string}.${string}.${string}`;
10
+ }, {
11
+ client_id: string;
12
+ client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
13
+ client_assertion: string;
14
+ }>, z.ZodObject<{
15
+ client_id: z.ZodString;
16
+ client_secret: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ client_id: string;
19
+ client_secret: string;
20
+ }, {
21
+ client_id: string;
22
+ client_secret: string;
23
+ }>]>, z.ZodObject<{
24
+ client_id: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ client_id: string;
27
+ }, {
28
+ client_id: string;
29
+ }>]>;
30
+ export type OAuthClientIdentification = z.infer<typeof oauthClientIdentificationSchema>;
31
+ //# sourceMappingURL=oauth-client-identification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-identification.d.ts","sourceRoot":"","sources":["../src/oauth-client-identification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.oauthClientIdentificationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const oauth_client_id_js_1 = require("./oauth-client-id.js");
6
+ const oauth_client_credentials_js_1 = require("./oauth-client-credentials.js");
7
+ exports.oauthClientIdentificationSchema = zod_1.z.union([
8
+ oauth_client_credentials_js_1.oauthClientCredentialsSchema,
9
+ // Must be last since it is less specific
10
+ zod_1.z.object({ client_id: oauth_client_id_js_1.oauthClientIdSchema }),
11
+ ]);
12
+ //# sourceMappingURL=oauth-client-identification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-client-identification.js","sourceRoot":"","sources":["../src/oauth-client-identification.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,6DAA0D;AAC1D,+EAA4E;AAE/D,QAAA,+BAA+B,GAAG,OAAC,CAAC,KAAK,CAAC;IACrD,0DAA4B;IAC5B,yCAAyC;IACzC,OAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,wCAAmB,EAAE,CAAC;CAC7C,CAAC,CAAA"}