@atproto/oauth-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +162 -32
  3. package/dist/errors/token-invalid-error.d.ts +7 -0
  4. package/dist/errors/token-invalid-error.d.ts.map +1 -0
  5. package/dist/errors/token-invalid-error.js +16 -0
  6. package/dist/errors/token-invalid-error.js.map +1 -0
  7. package/dist/errors/token-refresh-error.d.ts +7 -0
  8. package/dist/errors/token-refresh-error.d.ts.map +1 -0
  9. package/dist/errors/token-refresh-error.js +16 -0
  10. package/dist/errors/token-refresh-error.js.map +1 -0
  11. package/dist/errors/token-revoked-error.d.ts +7 -0
  12. package/dist/errors/token-revoked-error.d.ts.map +1 -0
  13. package/dist/errors/token-revoked-error.js +16 -0
  14. package/dist/errors/token-revoked-error.js.map +1 -0
  15. package/dist/index.d.ts +8 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +8 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/lock.d.ts +2 -1
  20. package/dist/lock.d.ts.map +1 -1
  21. package/dist/lock.js +2 -2
  22. package/dist/lock.js.map +1 -1
  23. package/dist/oauth-agent.d.ts.map +1 -1
  24. package/dist/oauth-agent.js +14 -9
  25. package/dist/oauth-agent.js.map +1 -1
  26. package/dist/oauth-client.d.ts +250 -20
  27. package/dist/oauth-client.d.ts.map +1 -1
  28. package/dist/oauth-client.js +67 -9
  29. package/dist/oauth-client.js.map +1 -1
  30. package/dist/oauth-resolver.d.ts +5 -4
  31. package/dist/oauth-resolver.d.ts.map +1 -1
  32. package/dist/oauth-resolver.js.map +1 -1
  33. package/dist/oauth-server-agent.d.ts.map +1 -1
  34. package/dist/oauth-server-agent.js +85 -29
  35. package/dist/oauth-server-agent.js.map +1 -1
  36. package/dist/runtime-implementation.d.ts +10 -5
  37. package/dist/runtime-implementation.d.ts.map +1 -1
  38. package/dist/runtime.d.ts +3 -3
  39. package/dist/runtime.d.ts.map +1 -1
  40. package/dist/runtime.js +18 -12
  41. package/dist/runtime.js.map +1 -1
  42. package/dist/session-getter.d.ts +19 -0
  43. package/dist/session-getter.d.ts.map +1 -1
  44. package/dist/session-getter.js +134 -42
  45. package/dist/session-getter.js.map +1 -1
  46. package/dist/state-store.d.ts +11 -0
  47. package/dist/state-store.d.ts.map +1 -0
  48. package/dist/state-store.js +3 -0
  49. package/dist/state-store.js.map +1 -0
  50. package/dist/types.d.ts +3 -2
  51. package/dist/types.d.ts.map +1 -1
  52. package/dist/types.js.map +1 -1
  53. package/dist/util.d.ts +10 -3
  54. package/dist/util.d.ts.map +1 -1
  55. package/dist/util.js +43 -23
  56. package/dist/util.js.map +1 -1
  57. package/dist/validate-client-metadata.d.ts.map +1 -1
  58. package/dist/validate-client-metadata.js +17 -0
  59. package/dist/validate-client-metadata.js.map +1 -1
  60. package/package.json +8 -8
  61. package/src/errors/token-invalid-error.ts +9 -0
  62. package/src/errors/token-refresh-error.ts +9 -0
  63. package/src/errors/token-revoked-error.ts +9 -0
  64. package/src/index.ts +11 -1
  65. package/src/lock.ts +3 -4
  66. package/src/oauth-agent.ts +20 -9
  67. package/src/oauth-client.ts +113 -31
  68. package/src/oauth-resolver.ts +4 -4
  69. package/src/oauth-server-agent.ts +9 -9
  70. package/src/runtime-implementation.ts +19 -11
  71. package/src/runtime.ts +13 -17
  72. package/src/session-getter.ts +135 -71
  73. package/src/state-store.ts +12 -0
  74. package/src/types.ts +5 -2
  75. package/src/util.ts +63 -32
  76. package/src/validate-client-metadata.ts +18 -0
@@ -2,9 +2,8 @@ import { DidCache } from '@atproto-labs/did-resolver';
2
2
  import { Fetch } from '@atproto-labs/fetch';
3
3
  import { HandleCache, HandleResolver } from '@atproto-labs/handle-resolver';
4
4
  import { IdentityResolver } from '@atproto-labs/identity-resolver';
5
- import { SimpleStore } from '@atproto-labs/simple-store';
6
5
  import { Key, Keyset } from '@atproto/jwk';
7
- import { OAuthClientMetadata, OAuthClientMetadataInput, OAuthResponseMode } from '@atproto/oauth-types';
6
+ import { OAuthClientIdDiscoverable, OAuthClientMetadata, OAuthClientMetadataInput, OAuthResponseMode } from '@atproto/oauth-types';
8
7
  import { OAuthAgent } from './oauth-agent.js';
9
8
  import { AuthorizationServerMetadataCache } from './oauth-authorization-server-metadata-resolver.js';
10
9
  import { ProtectedResourceMetadataCache } from './oauth-protected-resource-metadata-resolver.js';
@@ -13,21 +12,11 @@ import { DpopNonceCache, OAuthServerAgent } from './oauth-server-agent.js';
13
12
  import { OAuthServerFactory } from './oauth-server-factory.js';
14
13
  import { RuntimeImplementation } from './runtime-implementation.js';
15
14
  import { Runtime } from './runtime.js';
16
- import { SessionGetter, SessionStore } from './session-getter.js';
15
+ import { SessionEventMap, SessionGetter, SessionStore } from './session-getter.js';
16
+ import { InternalStateData, StateStore } from './state-store.js';
17
17
  import { AuthorizeOptions, ClientMetadata } from './types.js';
18
- export type InternalStateData = {
19
- iss: string;
20
- nonce: string;
21
- dpopKey: Key;
22
- verifier?: string;
23
- /**
24
- * @note This could be parametrized to be of any type. This wasn't done for
25
- * the sake of simplicity but could be added in a later development.
26
- */
27
- appState?: string;
28
- };
29
- export type StateStore = SimpleStore<string, InternalStateData>;
30
- export type { AuthorizationServerMetadataCache, DpopNonceCache, Fetch, Keyset, OAuthClientMetadata, OAuthClientMetadataInput, OAuthResponseMode, ProtectedResourceMetadataCache, RuntimeImplementation, SessionStore, };
18
+ import { CustomEventTarget } from './util.js';
19
+ export type { AuthorizationServerMetadataCache, DidCache, DpopNonceCache, Fetch, HandleCache, HandleResolver, InternalStateData, Key, Keyset, OAuthClientMetadata, OAuthClientMetadataInput, OAuthResponseMode, ProtectedResourceMetadataCache, RuntimeImplementation, SessionStore, StateStore, };
31
20
  export type OAuthClientOptions = {
32
21
  responseMode: OAuthResponseMode;
33
22
  clientMetadata: Readonly<OAuthClientMetadataInput>;
@@ -44,7 +33,147 @@ export type OAuthClientOptions = {
44
33
  runtimeImplementation: RuntimeImplementation;
45
34
  fetch?: Fetch;
46
35
  };
47
- export declare class OAuthClient {
36
+ export type OAuthClientEventMap = SessionEventMap;
37
+ export type OAuthClientFetchMetadataOptions = {
38
+ clientId: OAuthClientIdDiscoverable;
39
+ fetch?: Fetch;
40
+ signal?: AbortSignal;
41
+ };
42
+ export declare class OAuthClient extends CustomEventTarget<OAuthClientEventMap> {
43
+ static fetchMetadata({ clientId, fetch, signal, }: OAuthClientFetchMetadataOptions): Promise<{
44
+ redirect_uris: [string, ...string[]];
45
+ response_types: ["none" | "code" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token", ...("none" | "code" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token")[]];
46
+ grant_types: ["authorization_code" | "implicit" | "refresh_token" | "password" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer", ...("authorization_code" | "implicit" | "refresh_token" | "password" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer")[]];
47
+ scope?: string | undefined;
48
+ token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "private_key_jwt" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
49
+ token_endpoint_auth_signing_alg?: string | undefined;
50
+ introspection_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "private_key_jwt" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
51
+ introspection_endpoint_auth_signing_alg?: string | undefined;
52
+ revocation_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "private_key_jwt" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
53
+ revocation_endpoint_auth_signing_alg?: string | undefined;
54
+ pushed_authorization_request_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "private_key_jwt" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
55
+ pushed_authorization_request_endpoint_auth_signing_alg?: string | undefined;
56
+ userinfo_signed_response_alg?: string | undefined;
57
+ userinfo_encrypted_response_alg?: string | undefined;
58
+ jwks_uri?: string | undefined;
59
+ jwks?: {
60
+ keys: ({
61
+ kty: "RSA";
62
+ n: string;
63
+ e: string;
64
+ alg?: "RS256" | "PS256" | "RS384" | "PS384" | "RS512" | "PS512" | undefined;
65
+ kid?: string | undefined;
66
+ ext?: boolean | undefined;
67
+ use?: "sig" | "enc" | undefined;
68
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
69
+ x5c?: string[] | undefined;
70
+ x5t?: string | undefined;
71
+ 'x5t#S256'?: string | undefined;
72
+ x5u?: string | undefined;
73
+ d?: string | undefined;
74
+ p?: string | undefined;
75
+ q?: string | undefined;
76
+ dp?: string | undefined;
77
+ dq?: string | undefined;
78
+ qi?: string | undefined;
79
+ oth?: [{
80
+ d?: string | undefined;
81
+ r?: string | undefined;
82
+ t?: string | undefined;
83
+ }, ...{
84
+ d?: string | undefined;
85
+ r?: string | undefined;
86
+ t?: string | undefined;
87
+ }[]] | undefined;
88
+ } | {
89
+ kty: "EC";
90
+ crv: "P-256" | "P-384" | "P-521";
91
+ x: string;
92
+ y: string;
93
+ alg?: "ES256" | "ES384" | "ES512" | undefined;
94
+ kid?: string | undefined;
95
+ ext?: boolean | undefined;
96
+ use?: "sig" | "enc" | undefined;
97
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
98
+ x5c?: string[] | undefined;
99
+ x5t?: string | undefined;
100
+ 'x5t#S256'?: string | undefined;
101
+ x5u?: string | undefined;
102
+ d?: string | undefined;
103
+ } | {
104
+ kty: "EC";
105
+ crv: "secp256k1";
106
+ x: string;
107
+ y: string;
108
+ alg?: "ES256K" | undefined;
109
+ kid?: string | undefined;
110
+ ext?: boolean | undefined;
111
+ use?: "sig" | "enc" | undefined;
112
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
113
+ x5c?: string[] | undefined;
114
+ x5t?: string | undefined;
115
+ 'x5t#S256'?: string | undefined;
116
+ x5u?: string | undefined;
117
+ d?: string | undefined;
118
+ } | {
119
+ kty: "OKP";
120
+ crv: "Ed25519" | "Ed448";
121
+ x: string;
122
+ alg?: "EdDSA" | undefined;
123
+ kid?: string | undefined;
124
+ ext?: boolean | undefined;
125
+ use?: "sig" | "enc" | undefined;
126
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
127
+ x5c?: string[] | undefined;
128
+ x5t?: string | undefined;
129
+ 'x5t#S256'?: string | undefined;
130
+ x5u?: string | undefined;
131
+ d?: string | undefined;
132
+ } | {
133
+ kty: "oct";
134
+ k: string;
135
+ alg?: "HS256" | "HS384" | "HS512" | undefined;
136
+ kid?: string | undefined;
137
+ ext?: boolean | undefined;
138
+ use?: "sig" | "enc" | undefined;
139
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
140
+ x5c?: string[] | undefined;
141
+ x5t?: string | undefined;
142
+ 'x5t#S256'?: string | undefined;
143
+ x5u?: string | undefined;
144
+ } | {
145
+ kty: string;
146
+ alg?: string | undefined;
147
+ kid?: string | undefined;
148
+ ext?: boolean | undefined;
149
+ use?: "sig" | "enc" | undefined;
150
+ key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
151
+ x5c?: string[] | undefined;
152
+ x5t?: string | undefined;
153
+ 'x5t#S256'?: string | undefined;
154
+ x5u?: string | undefined;
155
+ })[];
156
+ } | undefined;
157
+ application_type?: "web" | "native" | undefined;
158
+ subject_type?: "public" | "pairwise" | undefined;
159
+ request_object_signing_alg?: string | undefined;
160
+ id_token_signed_response_alg?: string | undefined;
161
+ authorization_signed_response_alg?: string | undefined;
162
+ authorization_encrypted_response_enc?: "A128CBC-HS256" | undefined;
163
+ authorization_encrypted_response_alg?: string | undefined;
164
+ client_id?: string | undefined;
165
+ client_name?: string | undefined;
166
+ client_uri?: string | undefined;
167
+ policy_uri?: string | undefined;
168
+ tos_uri?: string | undefined;
169
+ logo_uri?: string | undefined;
170
+ default_max_age?: number | undefined;
171
+ require_auth_time?: boolean | undefined;
172
+ contacts?: string[] | undefined;
173
+ tls_client_certificate_bound_access_tokens?: boolean | undefined;
174
+ dpop_bound_access_tokens?: boolean | undefined;
175
+ authorization_details_types?: string[] | undefined;
176
+ }>;
48
177
  readonly clientMetadata: ClientMetadata;
49
178
  readonly responseMode: OAuthResponseMode;
50
179
  readonly keyset?: Keyset;
@@ -58,9 +187,110 @@ export declare class OAuthClient {
58
187
  get identityResolver(): IdentityResolver;
59
188
  get didResolver(): import("@atproto-labs/did-resolver").DidResolver<"web" | "plc">;
60
189
  get handleResolver(): HandleResolver;
61
- authorize(input: string, options?: AuthorizeOptions & {
62
- signal?: AbortSignal;
63
- }): Promise<URL>;
190
+ get jwks(): {
191
+ readonly keys: readonly ({
192
+ readonly kty: "RSA";
193
+ readonly n: string;
194
+ readonly e: string;
195
+ readonly alg?: "RS256" | "PS256" | "RS384" | "PS384" | "RS512" | "PS512" | undefined;
196
+ readonly kid?: string | undefined;
197
+ readonly ext?: boolean | undefined;
198
+ readonly use?: "sig" | "enc" | undefined;
199
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
200
+ readonly x5c?: readonly string[] | undefined;
201
+ readonly x5t?: string | undefined;
202
+ readonly 'x5t#S256'?: string | undefined;
203
+ readonly x5u?: string | undefined;
204
+ readonly d?: string | undefined;
205
+ readonly p?: string | undefined;
206
+ readonly q?: string | undefined;
207
+ readonly dp?: string | undefined;
208
+ readonly dq?: string | undefined;
209
+ readonly qi?: string | undefined;
210
+ readonly oth?: readonly [{
211
+ readonly d?: string | undefined;
212
+ readonly r?: string | undefined;
213
+ readonly t?: string | undefined;
214
+ }, ...{
215
+ readonly d?: string | undefined;
216
+ readonly r?: string | undefined;
217
+ readonly t?: string | undefined;
218
+ }[]] | undefined;
219
+ } | {
220
+ readonly kty: "EC";
221
+ readonly crv: "P-256" | "P-384" | "P-521";
222
+ readonly x: string;
223
+ readonly y: string;
224
+ readonly alg?: "ES256" | "ES384" | "ES512" | undefined;
225
+ readonly kid?: string | undefined;
226
+ readonly ext?: boolean | undefined;
227
+ readonly use?: "sig" | "enc" | undefined;
228
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
229
+ readonly x5c?: readonly string[] | undefined;
230
+ readonly x5t?: string | undefined;
231
+ readonly 'x5t#S256'?: string | undefined;
232
+ readonly x5u?: string | undefined;
233
+ readonly d?: string | undefined;
234
+ } | {
235
+ readonly kty: "EC";
236
+ readonly crv: "secp256k1";
237
+ readonly x: string;
238
+ readonly y: string;
239
+ readonly alg?: "ES256K" | undefined;
240
+ readonly kid?: string | undefined;
241
+ readonly ext?: boolean | undefined;
242
+ readonly use?: "sig" | "enc" | undefined;
243
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
244
+ readonly x5c?: readonly string[] | undefined;
245
+ readonly x5t?: string | undefined;
246
+ readonly 'x5t#S256'?: string | undefined;
247
+ readonly x5u?: string | undefined;
248
+ readonly d?: string | undefined;
249
+ } | {
250
+ readonly kty: "OKP";
251
+ readonly crv: "Ed25519" | "Ed448";
252
+ readonly x: string;
253
+ readonly alg?: "EdDSA" | undefined;
254
+ readonly kid?: string | undefined;
255
+ readonly ext?: boolean | undefined;
256
+ readonly use?: "sig" | "enc" | undefined;
257
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
258
+ readonly x5c?: readonly string[] | undefined;
259
+ readonly x5t?: string | undefined;
260
+ readonly 'x5t#S256'?: string | undefined;
261
+ readonly x5u?: string | undefined;
262
+ readonly d?: string | undefined;
263
+ } | {
264
+ readonly kty: "oct";
265
+ readonly k: string;
266
+ readonly alg?: "HS256" | "HS384" | "HS512" | undefined;
267
+ readonly kid?: string | undefined;
268
+ readonly ext?: boolean | undefined;
269
+ readonly use?: "sig" | "enc" | undefined;
270
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
271
+ readonly x5c?: readonly string[] | undefined;
272
+ readonly x5t?: string | undefined;
273
+ readonly 'x5t#S256'?: string | undefined;
274
+ readonly x5u?: string | undefined;
275
+ } | {
276
+ readonly kty: string;
277
+ readonly alg?: string | undefined;
278
+ readonly kid?: string | undefined;
279
+ readonly ext?: boolean | undefined;
280
+ readonly use?: "sig" | "enc" | undefined;
281
+ readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
282
+ readonly x5c?: readonly string[] | undefined;
283
+ readonly x5t?: string | undefined;
284
+ readonly 'x5t#S256'?: string | undefined;
285
+ readonly x5u?: string | undefined;
286
+ })[];
287
+ };
288
+ authorize(input: string, options?: AuthorizeOptions): Promise<URL>;
289
+ /**
290
+ * This method allows the client to proactively revoke the request_uri it
291
+ * created through PAR.
292
+ */
293
+ abortRequest(authorizeUrl: URL): Promise<void>;
64
294
  callback(params: URLSearchParams): Promise<{
65
295
  agent: OAuthAgent;
66
296
  state: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-client.d.ts","sourceRoot":"","sources":["../src/oauth-client.ts"],"names":[],"mapp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,aAAa,EAAE,aAAa,CAAA;IACrC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;gBAEnB,EACV,KAAwB,EAExB,UAAU,EACV,YAAY,EAEZ,QAAoB,EACpB,cAA+D,EAC/D,WAAuB,EACvB,gCAGE,EACF,8BAGE,EAEF,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,MAAM,GACP,EAAE,kBAAkB;IA4DrB,IAAI,gBAAgB,qBAEnB;IAGD,IAAI,WAAW,oEAEd;IAGD,IAAI,cAAc,mBAEjB;IAED,IAAI,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEP;IAEK,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC;IAsGxE;;;OAGG;IACG,YAAY,CAAC,YAAY,EAAE,GAAG;IAY9B,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC;QAC/C,KAAK,EAAE,UAAU,CAAA;QACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KACrB,CAAC;IAuGF;;;;;OAKG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IAc5D,MAAM,CAAC,GAAG,EAAE,MAAM;IAiBxB,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU;CAU/D"}
@@ -6,7 +6,9 @@ const handle_resolver_1 = require("@atproto-labs/handle-resolver");
6
6
  const identity_resolver_1 = require("@atproto-labs/identity-resolver");
7
7
  const simple_store_memory_1 = require("@atproto-labs/simple-store-memory");
8
8
  const jwk_1 = require("@atproto/jwk");
9
+ const oauth_types_1 = require("@atproto/oauth-types");
9
10
  const constants_js_1 = require("./constants.js");
11
+ const token_revoked_error_js_1 = require("./errors/token-revoked-error.js");
10
12
  const oauth_agent_js_1 = require("./oauth-agent.js");
11
13
  const oauth_authorization_server_metadata_resolver_js_1 = require("./oauth-authorization-server-metadata-resolver.js");
12
14
  const oauth_callback_error_js_1 = require("./oauth-callback-error.js");
@@ -15,8 +17,30 @@ const oauth_resolver_js_1 = require("./oauth-resolver.js");
15
17
  const oauth_server_factory_js_1 = require("./oauth-server-factory.js");
16
18
  const runtime_js_1 = require("./runtime.js");
17
19
  const session_getter_js_1 = require("./session-getter.js");
20
+ const util_js_1 = require("./util.js");
18
21
  const validate_client_metadata_js_1 = require("./validate-client-metadata.js");
19
- class OAuthClient {
22
+ class OAuthClient extends util_js_1.CustomEventTarget {
23
+ static async fetchMetadata({ clientId, fetch = globalThis.fetch, signal, }) {
24
+ signal?.throwIfAborted();
25
+ const request = new Request(clientId, {
26
+ redirect: 'error',
27
+ signal: signal,
28
+ });
29
+ const response = await fetch(request);
30
+ if (response.status !== 200) {
31
+ response.body?.cancel?.();
32
+ throw new TypeError(`Failed to fetch client metadata: ${response.status}`);
33
+ }
34
+ // https://drafts.aaronpk.com/draft-parecki-oauth-client-id-metadata-document/draft-parecki-oauth-client-id-metadata-document.html#section-4.1
35
+ const mime = response.headers.get('content-type')?.split(';')[0].trim();
36
+ if (mime !== 'application/json') {
37
+ response.body?.cancel?.();
38
+ throw new TypeError(`Invalid client metadata content type: ${mime}`);
39
+ }
40
+ const json = await response.json();
41
+ signal?.throwIfAborted();
42
+ return oauth_types_1.oauthClientMetadataSchema.parse(json);
43
+ }
20
44
  constructor({ fetch = globalThis.fetch, stateStore, sessionStore, didCache = undefined, dpopNonceCache = new simple_store_memory_1.SimpleStoreMemory({ ttl: 60e3, max: 100 }), handleCache = undefined, authorizationServerMetadataCache = new simple_store_memory_1.SimpleStoreMemory({
21
45
  ttl: 60e3,
22
46
  max: 100,
@@ -24,6 +48,7 @@ class OAuthClient {
24
48
  ttl: 60e3,
25
49
  max: 100,
26
50
  }), responseMode, clientMetadata, handleResolver, plcDirectoryUrl, runtimeImplementation, keyset, }) {
51
+ super();
27
52
  // Config
28
53
  Object.defineProperty(this, "clientMetadata", {
29
54
  enumerable: true,
@@ -94,6 +119,14 @@ class OAuthClient {
94
119
  this.serverFactory = new oauth_server_factory_js_1.OAuthServerFactory(this.clientMetadata, this.runtime, this.oauthResolver, this.fetch, this.keyset, dpopNonceCache);
95
120
  this.sessionGetter = new session_getter_js_1.SessionGetter(sessionStore, this.serverFactory, this.runtime);
96
121
  this.stateStore = stateStore;
122
+ // Proxy sessionGetter events
123
+ for (const type of ['deleted', 'updated']) {
124
+ this.sessionGetter.addEventListener(type, (event) => {
125
+ if (!this.dispatchCustomEvent(type, event.detail)) {
126
+ event.preventDefault();
127
+ }
128
+ });
129
+ }
97
130
  }
98
131
  // Exposed as public API for convenience
99
132
  get identityResolver() {
@@ -107,6 +140,9 @@ class OAuthClient {
107
140
  get handleResolver() {
108
141
  return this.identityResolver.handleResolver;
109
142
  }
143
+ get jwks() {
144
+ return this.keyset?.publicJwks ?? { keys: [] };
145
+ }
110
146
  async authorize(input, options) {
111
147
  const redirectUri = options?.redirect_uri ?? this.clientMetadata.redirect_uris[0];
112
148
  if (!this.clientMetadata.redirect_uris.includes(redirectUri)) {
@@ -141,7 +177,9 @@ class OAuthClient {
141
177
  code_challenge_method: pkce?.method,
142
178
  nonce,
143
179
  state,
144
- login_hint: identity?.did || undefined,
180
+ login_hint: identity
181
+ ? input // If input is a handle or a DID, use it as a login_hint
182
+ : undefined,
145
183
  response_mode: this.responseMode,
146
184
  response_type:
147
185
  // Negotiate by using the order in the client metadata
@@ -184,6 +222,20 @@ class OAuthClient {
184
222
  }
185
223
  throw new Error('Server does not support pushed authorization requests (PAR)');
186
224
  }
225
+ /**
226
+ * This method allows the client to proactively revoke the request_uri it
227
+ * created through PAR.
228
+ */
229
+ async abortRequest(authorizeUrl) {
230
+ const requestUri = authorizeUrl.searchParams.get('request_uri');
231
+ if (!requestUri)
232
+ return;
233
+ // @NOTE This is not implemented here because, 1) the request server should
234
+ // invalidate the request_uri after some delay anyways, and 2) I am not sure
235
+ // that the revocation endpoint is even supposed to support this (and I
236
+ // don't want to spend the time checking now).
237
+ // @TODO investigate actual necessity & feasibility of this feature
238
+ }
187
239
  async callback(params) {
188
240
  const responseJwt = params.get('response');
189
241
  if (responseJwt != null) {
@@ -263,15 +315,21 @@ class OAuthClient {
263
315
  return this.createAgent(server, sub);
264
316
  }
265
317
  async revoke(sub) {
266
- const { dpopKey, tokenSet } = await this.sessionGetter.get(sub, {
267
- allowStale: true,
268
- });
269
- const server = await this.serverFactory.fromIssuer(tokenSet.iss, dpopKey);
270
- await server.revoke(tokenSet.access_token);
271
- await this.sessionGetter.delStored(sub);
318
+ const { dpopKey, tokenSet } = await this.sessionGetter.getSession(sub, false);
319
+ // NOT using `;(await this.restore(sub, false)).signOut()` because we want
320
+ // the tokens to be deleted even if it was not possible to fetch the issuer
321
+ // data.
322
+ try {
323
+ const server = await this.serverFactory.fromIssuer(tokenSet.iss, dpopKey);
324
+ await server.revoke(tokenSet.access_token);
325
+ }
326
+ finally {
327
+ await this.sessionGetter.delStored(sub, new token_revoked_error_js_1.TokenRevokedError(sub));
328
+ }
272
329
  }
273
330
  createAgent(server, sub) {
274
- return new oauth_agent_js_1.OAuthAgent(server, sub, this.sessionGetter, this.fetch);
331
+ const oauthAgent = new oauth_agent_js_1.OAuthAgent(server, sub, this.sessionGetter, this.fetch);
332
+ return oauthAgent;
275
333
  }
276
334
  }
277
335
  exports.OAuthClient = OAuthClient;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-client.js","sourceRoot":"","sources":["../src/oauth-client.ts"],"names":[],"mappings":";;;AAAA,6DAImC;AAEnC,mEAKsC;AACtC,uEAAkE;AAElE,2EAAqE;AACrE,sCAA0C;AAO1C,iDAA6C;AAC7C,qDAA6C;AAC7C,uHAG0D;AAC1D,uEAA8D;AAC9D,mHAGwD;AAC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IACtC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW;QACtB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAC/D,GAAG,EACH,KAAK,CACN,CAAA;QAED,0EAA0E;QAC1E,2EAA2E;QAC3E,QAAQ;QACR,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YACzE,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;QAC5C,CAAC;gBAAS,CAAC;YACT,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,0CAAiB,CAAC,GAAG,CAAC,CAAC,CAAA;QACrE,CAAC;IACH,CAAC;IAED,WAAW,CAAC,MAAwB,EAAE,GAAW;QAC/C,MAAM,UAAU,GAAG,IAAI,2BAAU,CAC/B,MAAM,EACN,GAAG,EACH,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,KAAK,CACX,CAAA;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAraD,kCAqaC"}
@@ -1,15 +1,15 @@
1
- import { ResolveOptions as IdentityResolveOptions, IdentityResolver, ResolvedIdentity } from '@atproto-labs/identity-resolver';
1
+ import { ResolveIdentityOptions, IdentityResolver, ResolvedIdentity } from '@atproto-labs/identity-resolver';
2
2
  import { OAuthAuthorizationServerMetadata } from '@atproto/oauth-types';
3
3
  import { GetCachedOptions, OAuthAuthorizationServerMetadataResolver } from './oauth-authorization-server-metadata-resolver.js';
4
4
  import { OAuthProtectedResourceMetadataResolver } from './oauth-protected-resource-metadata-resolver.js';
5
5
  export type { GetCachedOptions };
6
- export type ResolveOptions = GetCachedOptions & IdentityResolveOptions;
6
+ export type ResolveOAuthOptions = GetCachedOptions & ResolveIdentityOptions;
7
7
  export declare class OAuthResolver {
8
8
  readonly identityResolver: IdentityResolver;
9
9
  readonly protectedResourceMetadataResolver: OAuthProtectedResourceMetadataResolver;
10
10
  readonly authorizationServerMetadataResolver: OAuthAuthorizationServerMetadataResolver;
11
11
  constructor(identityResolver: IdentityResolver, protectedResourceMetadataResolver: OAuthProtectedResourceMetadataResolver, authorizationServerMetadataResolver: OAuthAuthorizationServerMetadataResolver);
12
- resolveIdentity(input: string, options?: IdentityResolveOptions): Promise<ResolvedIdentity>;
12
+ resolveIdentity(input: string, options?: ResolveIdentityOptions): Promise<ResolvedIdentity>;
13
13
  resolveMetadata(issuer: string, options?: GetCachedOptions): Promise<OAuthAuthorizationServerMetadata>;
14
14
  resolvePdsMetadata(pds: string | URL, options?: GetCachedOptions): Promise<{
15
15
  issuer: string;
@@ -53,8 +53,9 @@ export declare class OAuthResolver {
53
53
  registration_endpoint?: string | undefined;
54
54
  dpop_signing_alg_values_supported?: string[] | undefined;
55
55
  protected_resources?: string[] | undefined;
56
+ client_id_metadata_document_supported?: boolean | undefined;
56
57
  }>;
57
- resolve(input: string, options?: ResolveOptions): Promise<{
58
+ resolve(input: string, options?: ResolveOAuthOptions): Promise<{
58
59
  identity: ResolvedIdentity;
59
60
  metadata: OAuthAuthorizationServerMetadata;
60
61
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-resolver.d.ts","sourceRoot":"","sources":["../src/oauth-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,sBAAsB,EACxC,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAGvE,OAAO,EACL,gBAAgB,EAChB,wCAAwC,EACzC,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,sCAAsC,EAAE,MAAM,iDAAiD,CAAA;AAExG,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAChC,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,sBA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