@atproto/oauth-types 0.1.5 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/atproto-loopback-client-metadata.d.ts +4 -1
  3. package/dist/atproto-loopback-client-metadata.d.ts.map +1 -1
  4. package/dist/atproto-loopback-client-metadata.js +1 -2
  5. package/dist/atproto-loopback-client-metadata.js.map +1 -1
  6. package/dist/constants.d.ts +0 -6
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +1 -17
  9. package/dist/constants.js.map +1 -1
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/oauth-authorization-code-grant-token-request.d.ts +2 -2
  15. package/dist/oauth-authorization-code-grant-token-request.d.ts.map +1 -1
  16. package/dist/oauth-authorization-code-grant-token-request.js +2 -1
  17. package/dist/oauth-authorization-code-grant-token-request.js.map +1 -1
  18. package/dist/oauth-authorization-details.d.ts +42 -4
  19. package/dist/oauth-authorization-details.d.ts.map +1 -1
  20. package/dist/oauth-authorization-details.js +21 -1
  21. package/dist/oauth-authorization-details.js.map +1 -1
  22. package/dist/oauth-authorization-request-jar.d.ts +1 -1
  23. package/dist/oauth-authorization-request-par.d.ts +11 -11
  24. package/dist/oauth-authorization-request-parameters.d.ts +10 -10
  25. package/dist/oauth-authorization-request-parameters.d.ts.map +1 -1
  26. package/dist/oauth-authorization-request-parameters.js +3 -2
  27. package/dist/oauth-authorization-request-parameters.js.map +1 -1
  28. package/dist/oauth-authorization-request-query.d.ts +11 -11
  29. package/dist/oauth-authorization-server-metadata.d.ts +69 -66
  30. package/dist/oauth-authorization-server-metadata.d.ts.map +1 -1
  31. package/dist/oauth-authorization-server-metadata.js +14 -10
  32. package/dist/oauth-authorization-server-metadata.js.map +1 -1
  33. package/dist/oauth-client-id-discoverable.d.ts +3 -2
  34. package/dist/oauth-client-id-discoverable.d.ts.map +1 -1
  35. package/dist/oauth-client-id-discoverable.js +54 -31
  36. package/dist/oauth-client-id-discoverable.js.map +1 -1
  37. package/dist/oauth-client-id-loopback.d.ts +5 -5
  38. package/dist/oauth-client-id-loopback.d.ts.map +1 -1
  39. package/dist/oauth-client-id-loopback.js +32 -31
  40. package/dist/oauth-client-id-loopback.js.map +1 -1
  41. package/dist/oauth-client-metadata.d.ts +112 -102
  42. package/dist/oauth-client-metadata.d.ts.map +1 -1
  43. package/dist/oauth-client-metadata.js +18 -8
  44. package/dist/oauth-client-metadata.js.map +1 -1
  45. package/dist/oauth-issuer-identifier.d.ts +2 -1
  46. package/dist/oauth-issuer-identifier.d.ts.map +1 -1
  47. package/dist/oauth-issuer-identifier.js +8 -23
  48. package/dist/oauth-issuer-identifier.js.map +1 -1
  49. package/dist/oauth-protected-resource-metadata.d.ts +15 -12
  50. package/dist/oauth-protected-resource-metadata.d.ts.map +1 -1
  51. package/dist/oauth-protected-resource-metadata.js +15 -5
  52. package/dist/oauth-protected-resource-metadata.js.map +1 -1
  53. package/dist/oauth-redirect-uri.d.ts +10 -0
  54. package/dist/oauth-redirect-uri.d.ts.map +1 -0
  55. package/dist/oauth-redirect-uri.js +35 -0
  56. package/dist/oauth-redirect-uri.js.map +1 -0
  57. package/dist/oauth-refresh-token-grant-token-request.d.ts +0 -3
  58. package/dist/oauth-refresh-token-grant-token-request.d.ts.map +1 -1
  59. package/dist/oauth-refresh-token-grant-token-request.js +0 -2
  60. package/dist/oauth-refresh-token-grant-token-request.js.map +1 -1
  61. package/dist/oauth-token-request.d.ts +2 -5
  62. package/dist/oauth-token-request.d.ts.map +1 -1
  63. package/dist/oauth-token-response.d.ts +9 -12
  64. package/dist/oauth-token-response.d.ts.map +1 -1
  65. package/dist/oauth-token-response.js +4 -2
  66. package/dist/oauth-token-response.js.map +1 -1
  67. package/dist/uri.d.ts +20 -0
  68. package/dist/uri.d.ts.map +1 -0
  69. package/dist/uri.js +127 -0
  70. package/dist/uri.js.map +1 -0
  71. package/dist/util.js +5 -6
  72. package/dist/util.js.map +1 -1
  73. package/package.json +2 -2
  74. package/src/atproto-loopback-client-metadata.ts +8 -3
  75. package/src/constants.ts +0 -16
  76. package/src/index.ts +2 -0
  77. package/src/oauth-authorization-code-grant-token-request.ts +2 -1
  78. package/src/oauth-authorization-details.ts +21 -1
  79. package/src/oauth-authorization-request-parameters.ts +3 -2
  80. package/src/oauth-authorization-server-metadata.ts +14 -10
  81. package/src/oauth-client-id-discoverable.ts +69 -51
  82. package/src/oauth-client-id-loopback.ts +40 -40
  83. package/src/oauth-client-metadata.ts +18 -8
  84. package/src/oauth-issuer-identifier.ts +14 -24
  85. package/src/oauth-protected-resource-metadata.ts +15 -5
  86. package/src/oauth-redirect-uri.ts +56 -0
  87. package/src/oauth-refresh-token-grant-token-request.ts +0 -2
  88. package/src/oauth-token-response.ts +4 -2
  89. package/src/uri.ts +171 -0
  90. package/tsconfig.build.tsbuildinfo +1 -0
@@ -1,12 +1,12 @@
1
- import { OAuthClientId } from './oauth-client-id.js';
1
+ import { TypeOf } from 'zod';
2
+ import { OAuthRedirectUri } from './oauth-redirect-uri.js';
2
3
  import { OAuthScope } from './oauth-scope.js';
3
- declare const OAUTH_CLIENT_ID_LOOPBACK_URL = "http://localhost";
4
- export type OAuthClientIdLoopback = OAuthClientId & `${typeof OAUTH_CLIENT_ID_LOOPBACK_URL}${'' | '/'}${'' | `?${string}`}`;
4
+ export declare const oauthClientIdLoopbackSchema: import("zod").ZodEffects<import("zod").ZodString, "http://localhost" | `http://localhost?${string}` | "http://localhost/" | `http://localhost/?${string}`, string>;
5
+ export type OAuthClientIdLoopback = TypeOf<typeof oauthClientIdLoopbackSchema>;
5
6
  export declare function isOAuthClientIdLoopback(clientId: string): clientId is OAuthClientIdLoopback;
6
7
  export declare function assertOAuthLoopbackClientId(clientId: string): asserts clientId is OAuthClientIdLoopback;
7
8
  export declare function parseOAuthLoopbackClientId(clientId: string): {
8
9
  scope?: OAuthScope;
9
- redirect_uris?: [string, ...string[]];
10
+ redirect_uris?: [OAuthRedirectUri, ...OAuthRedirectUri[]];
10
11
  };
11
- export {};
12
12
  //# sourceMappingURL=oauth-client-id-loopback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-client-id-loopback.d.ts","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAA;AAG/D,QAAA,MAAM,4BAA4B,qBAAqB,CAAA;AAEvD,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAC/C,GAAG,OAAO,4BAA4B,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,IAAI,MAAM,EAAE,EAAE,CAAA;AAEzE,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GACf,QAAQ,IAAI,qBAAqB,CAOnC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,IAAI,qBAAqB,CAE3C;AAID,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC5D,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;CACtC,CA0EA"}
1
+ {"version":3,"file":"oauth-client-id-loopback.d.ts","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,KAAK,CAAA;AAE1C,OAAO,EAGL,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAA;AAI/D,eAAO,MAAM,2BAA2B,oKAgBvC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE9E,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GACf,QAAQ,IAAI,qBAAqB,CAOnC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,IAAI,qBAAqB,CAE3C;AAID,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC5D,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,aAAa,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAAC,CAAA;CAC1D,CAoDA"}
@@ -1,9 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseOAuthLoopbackClientId = exports.assertOAuthLoopbackClientId = exports.isOAuthClientIdLoopback = void 0;
3
+ exports.oauthClientIdLoopbackSchema = void 0;
4
+ exports.isOAuthClientIdLoopback = isOAuthClientIdLoopback;
5
+ exports.assertOAuthLoopbackClientId = assertOAuthLoopbackClientId;
6
+ exports.parseOAuthLoopbackClientId = parseOAuthLoopbackClientId;
7
+ const zod_1 = require("zod");
8
+ const oauth_client_id_js_1 = require("./oauth-client-id.js");
9
+ const oauth_redirect_uri_js_1 = require("./oauth-redirect-uri.js");
4
10
  const oauth_scope_js_1 = require("./oauth-scope.js");
5
- const util_js_1 = require("./util.js");
6
- const OAUTH_CLIENT_ID_LOOPBACK_URL = 'http://localhost';
11
+ const PREFIX = 'http://localhost';
12
+ exports.oauthClientIdLoopbackSchema = oauth_client_id_js_1.oauthClientIdSchema.superRefine((value, ctx) => {
13
+ try {
14
+ assertOAuthLoopbackClientId(value);
15
+ return true;
16
+ }
17
+ catch (error) {
18
+ ctx.addIssue({
19
+ code: zod_1.ZodIssueCode.custom,
20
+ message: error instanceof TypeError
21
+ ? error.message
22
+ : 'Invalid loopback client ID',
23
+ });
24
+ return false;
25
+ }
26
+ });
7
27
  function isOAuthClientIdLoopback(clientId) {
8
28
  try {
9
29
  parseOAuthLoopbackClientId(clientId);
@@ -13,24 +33,21 @@ function isOAuthClientIdLoopback(clientId) {
13
33
  return false;
14
34
  }
15
35
  }
16
- exports.isOAuthClientIdLoopback = isOAuthClientIdLoopback;
17
36
  function assertOAuthLoopbackClientId(clientId) {
18
37
  void parseOAuthLoopbackClientId(clientId);
19
38
  }
20
- exports.assertOAuthLoopbackClientId = assertOAuthLoopbackClientId;
21
39
  // @TODO: should we turn this into a zod schema? (more coherent error with other
22
40
  // validation functions)
23
41
  function parseOAuthLoopbackClientId(clientId) {
24
- if (!clientId.startsWith(OAUTH_CLIENT_ID_LOOPBACK_URL)) {
25
- throw new TypeError(`Loopback ClientID must start with "${OAUTH_CLIENT_ID_LOOPBACK_URL}"`);
42
+ if (!clientId.startsWith(PREFIX)) {
43
+ throw new TypeError(`Loopback ClientID must start with "${PREFIX}"`);
26
44
  }
27
- else if (clientId.includes('#', OAUTH_CLIENT_ID_LOOPBACK_URL.length)) {
45
+ else if (clientId.includes('#', PREFIX.length)) {
28
46
  throw new TypeError('Loopback ClientID must not contain a hash component');
29
47
  }
30
- const queryStringIdx = clientId.length > OAUTH_CLIENT_ID_LOOPBACK_URL.length &&
31
- clientId[OAUTH_CLIENT_ID_LOOPBACK_URL.length] === '/'
32
- ? OAUTH_CLIENT_ID_LOOPBACK_URL.length + 1
33
- : OAUTH_CLIENT_ID_LOOPBACK_URL.length;
48
+ const queryStringIdx = clientId.length > PREFIX.length && clientId[PREFIX.length] === '/'
49
+ ? PREFIX.length + 1
50
+ : PREFIX.length;
34
51
  if (clientId.length === queryStringIdx) {
35
52
  return {}; // no query string to parse
36
53
  }
@@ -53,29 +70,13 @@ function parseOAuthLoopbackClientId(clientId) {
53
70
  }
54
71
  }
55
72
  const redirect_uris = searchParams.has('redirect_uri')
56
- ? searchParams.getAll('redirect_uri')
73
+ ? searchParams
74
+ .getAll('redirect_uri')
75
+ .map((value) => oauth_redirect_uri_js_1.oauthLoopbackRedirectURISchema.parse(value))
57
76
  : undefined;
58
- if (redirect_uris) {
59
- for (const uri of redirect_uris) {
60
- const url = (0, util_js_1.safeUrl)(uri);
61
- if (!url) {
62
- throw new TypeError(`Invalid redirect_uri in client ID: ${uri}`);
63
- }
64
- if (url.protocol !== 'http:') {
65
- throw new TypeError(`Loopback ClientID must use "http:" redirect_uri's (got ${uri})`);
66
- }
67
- if (url.hostname === 'localhost') {
68
- throw new TypeError(`Loopback ClientID must not use "localhost" as redirect_uri hostname (got ${uri})`);
69
- }
70
- if (!(0, util_js_1.isLoopbackHost)(url.hostname)) {
71
- throw new TypeError(`Loopback ClientID must use loopback addresses as redirect_uri's (got ${uri})`);
72
- }
73
- }
74
- }
75
77
  return {
76
78
  scope,
77
79
  redirect_uris,
78
80
  };
79
81
  }
80
- exports.parseOAuthLoopbackClientId = parseOAuthLoopbackClientId;
81
82
  //# sourceMappingURL=oauth-client-id-loopback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-client-id-loopback.js","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":";;;AACA,qDAA+D;AAC/D,uCAAmD;AAEnD,MAAM,4BAA4B,GAAG,kBAAkB,CAAA;AAKvD,SAAgB,uBAAuB,CACrC,QAAgB;IAEhB,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,2BAA2B,CACzC,QAAgB;IAEhB,KAAK,0BAA0B,CAAC,QAAQ,CAAC,CAAA;AAC3C,CAAC;AAJD,kEAIC;AAED,gFAAgF;AAChF,wBAAwB;AACxB,SAAgB,0BAA0B,CAAC,QAAgB;IAIzD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,SAAS,CACjB,sCAAsC,4BAA4B,GAAG,CACtE,CAAA;IACH,CAAC;SAAM,IAAI,QAAQ,CAA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C,OAAO,EAAE,CAAC;YACtD,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;IAED,MAAM,aAAa,GAAG,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC;QACpD,CAAC,CAAE,YAAY,CAAC,MAAM,CAAC,cAAc,CAA2B;QAChE,CAAC,CAAC,SAAS,CAAA;IAEb,IAAI,aAAa,EAAE,CAAC;QAClB,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;YAChC,MAAM,GAAG,GAAG,IAAA,iBAAO,EAAC,GAAG,CAAC,CAAA;YACxB,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,MAAM,IAAI,SAAS,CAAC,sCAAsC,GAAG,EAAE,CAAC,CAAA;YAClE,CAAC;YACD,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;gBAC7B,MAAM,IAAI,SAAS,CACjB,0DAA0D,GAAG,GAAG,CACjE,CAAA;YACH,CAAC;YACD,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;gBACjC,MAAM,IAAI,SAAS,CACjB,4EAA4E,GAAG,GAAG,CACnF,CAAA;YACH,CAAC;YACD,IAAI,CAAC,IAAA,wBAAc,EAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAClC,MAAM,IAAI,SAAS,CACjB,wEAAwE,GAAG,GAAG,CAC/E,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK;QACL,aAAa;KACd,CAAA;AACH,CAAC;AA7ED,gEA6EC"}
1
+ {"version":3,"file":"oauth-client-id-loopback.js","sourceRoot":"","sources":["../src/oauth-client-id-loopback.ts"],"names":[],"mappings":";;;AA+BA,0DASC;AAED,kEAIC;AAID,gEAuDC;AAzGD,6BAA0C;AAC1C,6DAA0D;AAC1D,mEAIgC;AAChC,qDAA+D;AAE/D,MAAM,MAAM,GAAG,kBAAkB,CAAA;AAEpB,QAAA,2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