@atproto/oauth-client 0.1.0 → 0.1.2-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +23 -0
- package/README.md +165 -31
- package/dist/errors/token-invalid-error.d.ts +7 -0
- package/dist/errors/token-invalid-error.d.ts.map +1 -0
- package/dist/errors/token-invalid-error.js +16 -0
- package/dist/errors/token-invalid-error.js.map +1 -0
- package/dist/errors/token-refresh-error.d.ts +7 -0
- package/dist/errors/token-refresh-error.d.ts.map +1 -0
- package/dist/errors/token-refresh-error.js +16 -0
- package/dist/errors/token-refresh-error.js.map +1 -0
- package/dist/errors/token-revoked-error.d.ts +7 -0
- package/dist/errors/token-revoked-error.d.ts.map +1 -0
- package/dist/errors/token-revoked-error.js +16 -0
- package/dist/errors/token-revoked-error.js.map +1 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/lock.d.ts +2 -1
- package/dist/lock.d.ts.map +1 -1
- package/dist/lock.js +2 -2
- package/dist/lock.js.map +1 -1
- package/dist/oauth-agent.d.ts.map +1 -1
- package/dist/oauth-agent.js +14 -9
- package/dist/oauth-agent.js.map +1 -1
- package/dist/oauth-atp-agent.d.ts +11 -0
- package/dist/oauth-atp-agent.d.ts.map +1 -0
- package/dist/oauth-atp-agent.js +52 -0
- package/dist/oauth-atp-agent.js.map +1 -0
- package/dist/oauth-client.d.ts +254 -24
- package/dist/oauth-client.d.ts.map +1 -1
- package/dist/oauth-client.js +68 -9
- package/dist/oauth-client.js.map +1 -1
- package/dist/oauth-resolver.d.ts +5 -4
- package/dist/oauth-resolver.d.ts.map +1 -1
- package/dist/oauth-resolver.js.map +1 -1
- package/dist/oauth-server-agent.d.ts.map +1 -1
- package/dist/oauth-server-agent.js +85 -29
- package/dist/oauth-server-agent.js.map +1 -1
- package/dist/runtime-implementation.d.ts +10 -5
- package/dist/runtime-implementation.d.ts.map +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +18 -12
- package/dist/runtime.js.map +1 -1
- package/dist/session-getter.d.ts +19 -0
- package/dist/session-getter.d.ts.map +1 -1
- package/dist/session-getter.js +134 -42
- package/dist/session-getter.js.map +1 -1
- package/dist/state-store.d.ts +11 -0
- package/dist/state-store.d.ts.map +1 -0
- package/dist/state-store.js +3 -0
- package/dist/state-store.js.map +1 -0
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +10 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +43 -23
- package/dist/util.js.map +1 -1
- package/dist/validate-client-metadata.d.ts.map +1 -1
- package/dist/validate-client-metadata.js +17 -0
- package/dist/validate-client-metadata.js.map +1 -1
- package/package.json +10 -8
- package/src/errors/token-invalid-error.ts +9 -0
- package/src/{refresh-error.ts → errors/token-refresh-error.ts} +1 -1
- package/src/errors/token-revoked-error.ts +9 -0
- package/src/index.ts +12 -1
- package/src/lock.ts +3 -4
- package/src/oauth-agent.ts +20 -9
- package/src/oauth-atp-agent.ts +49 -0
- package/src/oauth-client.ts +117 -34
- package/src/oauth-resolver.ts +4 -4
- package/src/oauth-server-agent.ts +9 -9
- package/src/runtime-implementation.ts +19 -11
- package/src/runtime.ts +13 -17
- package/src/session-getter.ts +135 -71
- package/src/state-store.ts +12 -0
- package/src/types.ts +5 -2
- package/src/util.ts +63 -32
- package/src/validate-client-metadata.ts +18 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OAuthAtpAgent = void 0;
|
4
|
+
const api_1 = require("@atproto/api");
|
5
|
+
const xrpc_1 = require("@atproto/xrpc");
|
6
|
+
const fetch_1 = require("@atproto-labs/fetch");
|
7
|
+
class OAuthAtpAgent extends api_1.Agent {
|
8
|
+
constructor(oauthAgent) {
|
9
|
+
super(async (url, init) => {
|
10
|
+
try {
|
11
|
+
return await this.oauthAgent.request(url, init);
|
12
|
+
}
|
13
|
+
catch (cause) {
|
14
|
+
if (cause instanceof fetch_1.FetchError) {
|
15
|
+
const { statusCode, message } = cause;
|
16
|
+
throw new xrpc_1.XRPCError(statusCode, undefined, message, undefined, {
|
17
|
+
cause,
|
18
|
+
});
|
19
|
+
}
|
20
|
+
if (cause instanceof fetch_1.FetchResponseError) {
|
21
|
+
const { statusCode, message, response } = cause;
|
22
|
+
const headers = Object.fromEntries(response.headers.entries());
|
23
|
+
throw new xrpc_1.XRPCError(statusCode, undefined, message, headers, {
|
24
|
+
cause,
|
25
|
+
});
|
26
|
+
}
|
27
|
+
throw cause;
|
28
|
+
}
|
29
|
+
});
|
30
|
+
Object.defineProperty(this, "oauthAgent", {
|
31
|
+
enumerable: true,
|
32
|
+
configurable: true,
|
33
|
+
writable: true,
|
34
|
+
value: oauthAgent
|
35
|
+
});
|
36
|
+
}
|
37
|
+
clone() {
|
38
|
+
const agent = new OAuthAtpAgent(this.oauthAgent);
|
39
|
+
return this.copyInto(agent);
|
40
|
+
}
|
41
|
+
get did() {
|
42
|
+
return this.oauthAgent.sub;
|
43
|
+
}
|
44
|
+
async signOut() {
|
45
|
+
await this.oauthAgent.signOut();
|
46
|
+
}
|
47
|
+
async refreshIfNeeded() {
|
48
|
+
await this.oauthAgent.refreshIfNeeded();
|
49
|
+
}
|
50
|
+
}
|
51
|
+
exports.OAuthAtpAgent = OAuthAtpAgent;
|
52
|
+
//# sourceMappingURL=oauth-atp-agent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oauth-atp-agent.js","sourceRoot":"","sources":["../src/oauth-atp-agent.ts"],"names":[],"mappings":";;;AAAA,sCAAoC;AACpC,wCAAyC;AACzC,+CAAoE;AAIpE,MAAa,aAAc,SAAQ,WAAK;IACtC,YAAqB,UAAsB;QACzC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACxB,IAAI,CAAC;gBACH,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
package/dist/oauth-client.d.ts
CHANGED
@@ -2,10 +2,9 @@ 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';
|
8
|
-
import {
|
6
|
+
import { OAuthClientIdDiscoverable, OAuthClientMetadata, OAuthClientMetadataInput, OAuthResponseMode } from '@atproto/oauth-types';
|
7
|
+
import { OAuthAtpAgent } from './oauth-atp-agent.js';
|
9
8
|
import { AuthorizationServerMetadataCache } from './oauth-authorization-server-metadata-resolver.js';
|
10
9
|
import { ProtectedResourceMetadataCache } from './oauth-protected-resource-metadata-resolver.js';
|
11
10
|
import { OAuthResolver } from './oauth-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
|
-
|
19
|
-
|
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
|
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,11 +187,112 @@ 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
|
-
|
62
|
-
|
63
|
-
|
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
|
-
agent:
|
295
|
+
agent: OAuthAtpAgent;
|
66
296
|
state: string | null;
|
67
297
|
}>;
|
68
298
|
/**
|
@@ -71,8 +301,8 @@ export declare class OAuthClient {
|
|
71
301
|
*
|
72
302
|
* @param refresh See {@link SessionGetter.getSession}
|
73
303
|
*/
|
74
|
-
restore(sub: string, refresh?: boolean): Promise<
|
304
|
+
restore(sub: string, refresh?: boolean): Promise<OAuthAtpAgent>;
|
75
305
|
revoke(sub: string): Promise<void>;
|
76
|
-
createAgent(server: OAuthServerAgent, sub: string):
|
306
|
+
createAgent(server: OAuthServerAgent, sub: string): OAuthAtpAgent;
|
77
307
|
}
|
78
308
|
//# sourceMappingURL=oauth-client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-client.d.ts","sourceRoot":"","sources":["../src/oauth-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAGL,WAAW,EACX,cAAc,EACf,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;
|
1
|
+
{"version":3,"file":"oauth-client.d.ts","sourceRoot":"","sources":["../src/oauth-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGT,MAAM,4BA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AAgB,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa;CAUlE"}
|
package/dist/oauth-client.js
CHANGED
@@ -6,8 +6,11 @@ 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");
|
13
|
+
const oauth_atp_agent_js_1 = require("./oauth-atp-agent.js");
|
11
14
|
const oauth_authorization_server_metadata_resolver_js_1 = require("./oauth-authorization-server-metadata-resolver.js");
|
12
15
|
const oauth_callback_error_js_1 = require("./oauth-callback-error.js");
|
13
16
|
const oauth_protected_resource_metadata_resolver_js_1 = require("./oauth-protected-resource-metadata-resolver.js");
|
@@ -15,8 +18,30 @@ const oauth_resolver_js_1 = require("./oauth-resolver.js");
|
|
15
18
|
const oauth_server_factory_js_1 = require("./oauth-server-factory.js");
|
16
19
|
const runtime_js_1 = require("./runtime.js");
|
17
20
|
const session_getter_js_1 = require("./session-getter.js");
|
21
|
+
const util_js_1 = require("./util.js");
|
18
22
|
const validate_client_metadata_js_1 = require("./validate-client-metadata.js");
|
19
|
-
class OAuthClient {
|
23
|
+
class OAuthClient extends util_js_1.CustomEventTarget {
|
24
|
+
static async fetchMetadata({ clientId, fetch = globalThis.fetch, signal, }) {
|
25
|
+
signal?.throwIfAborted();
|
26
|
+
const request = new Request(clientId, {
|
27
|
+
redirect: 'error',
|
28
|
+
signal: signal,
|
29
|
+
});
|
30
|
+
const response = await fetch(request);
|
31
|
+
if (response.status !== 200) {
|
32
|
+
response.body?.cancel?.();
|
33
|
+
throw new TypeError(`Failed to fetch client metadata: ${response.status}`);
|
34
|
+
}
|
35
|
+
// https://drafts.aaronpk.com/draft-parecki-oauth-client-id-metadata-document/draft-parecki-oauth-client-id-metadata-document.html#section-4.1
|
36
|
+
const mime = response.headers.get('content-type')?.split(';')[0].trim();
|
37
|
+
if (mime !== 'application/json') {
|
38
|
+
response.body?.cancel?.();
|
39
|
+
throw new TypeError(`Invalid client metadata content type: ${mime}`);
|
40
|
+
}
|
41
|
+
const json = await response.json();
|
42
|
+
signal?.throwIfAborted();
|
43
|
+
return oauth_types_1.oauthClientMetadataSchema.parse(json);
|
44
|
+
}
|
20
45
|
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
46
|
ttl: 60e3,
|
22
47
|
max: 100,
|
@@ -24,6 +49,7 @@ class OAuthClient {
|
|
24
49
|
ttl: 60e3,
|
25
50
|
max: 100,
|
26
51
|
}), responseMode, clientMetadata, handleResolver, plcDirectoryUrl, runtimeImplementation, keyset, }) {
|
52
|
+
super();
|
27
53
|
// Config
|
28
54
|
Object.defineProperty(this, "clientMetadata", {
|
29
55
|
enumerable: true,
|
@@ -94,6 +120,14 @@ class OAuthClient {
|
|
94
120
|
this.serverFactory = new oauth_server_factory_js_1.OAuthServerFactory(this.clientMetadata, this.runtime, this.oauthResolver, this.fetch, this.keyset, dpopNonceCache);
|
95
121
|
this.sessionGetter = new session_getter_js_1.SessionGetter(sessionStore, this.serverFactory, this.runtime);
|
96
122
|
this.stateStore = stateStore;
|
123
|
+
// Proxy sessionGetter events
|
124
|
+
for (const type of ['deleted', 'updated']) {
|
125
|
+
this.sessionGetter.addEventListener(type, (event) => {
|
126
|
+
if (!this.dispatchCustomEvent(type, event.detail)) {
|
127
|
+
event.preventDefault();
|
128
|
+
}
|
129
|
+
});
|
130
|
+
}
|
97
131
|
}
|
98
132
|
// Exposed as public API for convenience
|
99
133
|
get identityResolver() {
|
@@ -107,6 +141,9 @@ class OAuthClient {
|
|
107
141
|
get handleResolver() {
|
108
142
|
return this.identityResolver.handleResolver;
|
109
143
|
}
|
144
|
+
get jwks() {
|
145
|
+
return this.keyset?.publicJwks ?? { keys: [] };
|
146
|
+
}
|
110
147
|
async authorize(input, options) {
|
111
148
|
const redirectUri = options?.redirect_uri ?? this.clientMetadata.redirect_uris[0];
|
112
149
|
if (!this.clientMetadata.redirect_uris.includes(redirectUri)) {
|
@@ -141,7 +178,9 @@ class OAuthClient {
|
|
141
178
|
code_challenge_method: pkce?.method,
|
142
179
|
nonce,
|
143
180
|
state,
|
144
|
-
login_hint: identity
|
181
|
+
login_hint: identity
|
182
|
+
? input // If input is a handle or a DID, use it as a login_hint
|
183
|
+
: undefined,
|
145
184
|
response_mode: this.responseMode,
|
146
185
|
response_type:
|
147
186
|
// Negotiate by using the order in the client metadata
|
@@ -184,6 +223,20 @@ class OAuthClient {
|
|
184
223
|
}
|
185
224
|
throw new Error('Server does not support pushed authorization requests (PAR)');
|
186
225
|
}
|
226
|
+
/**
|
227
|
+
* This method allows the client to proactively revoke the request_uri it
|
228
|
+
* created through PAR.
|
229
|
+
*/
|
230
|
+
async abortRequest(authorizeUrl) {
|
231
|
+
const requestUri = authorizeUrl.searchParams.get('request_uri');
|
232
|
+
if (!requestUri)
|
233
|
+
return;
|
234
|
+
// @NOTE This is not implemented here because, 1) the request server should
|
235
|
+
// invalidate the request_uri after some delay anyways, and 2) I am not sure
|
236
|
+
// that the revocation endpoint is even supposed to support this (and I
|
237
|
+
// don't want to spend the time checking now).
|
238
|
+
// @TODO investigate actual necessity & feasibility of this feature
|
239
|
+
}
|
187
240
|
async callback(params) {
|
188
241
|
const responseJwt = params.get('response');
|
189
242
|
if (responseJwt != null) {
|
@@ -263,15 +316,21 @@ class OAuthClient {
|
|
263
316
|
return this.createAgent(server, sub);
|
264
317
|
}
|
265
318
|
async revoke(sub) {
|
266
|
-
const { dpopKey, tokenSet } = await this.sessionGetter.
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
319
|
+
const { dpopKey, tokenSet } = await this.sessionGetter.getSession(sub, false);
|
320
|
+
// NOT using `;(await this.restore(sub, false)).signOut()` because we want
|
321
|
+
// the tokens to be deleted even if it was not possible to fetch the issuer
|
322
|
+
// data.
|
323
|
+
try {
|
324
|
+
const server = await this.serverFactory.fromIssuer(tokenSet.iss, dpopKey);
|
325
|
+
await server.revoke(tokenSet.access_token);
|
326
|
+
}
|
327
|
+
finally {
|
328
|
+
await this.sessionGetter.delStored(sub, new token_revoked_error_js_1.TokenRevokedError(sub));
|
329
|
+
}
|
272
330
|
}
|
273
331
|
createAgent(server, sub) {
|
274
|
-
|
332
|
+
const oauthAgent = new oauth_agent_js_1.OAuthAgent(server, sub, this.sessionGetter, this.fetch);
|
333
|
+
return new oauth_atp_agent_js_1.OAuthAtpAgent(oauthAgent);
|
275
334
|
}
|
276
335
|
}
|
277
336
|
exports.OAuthClient = OAuthClient;
|
package/dist/oauth-client.js.map
CHANGED
@@ -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;AACxD,2DAAmD;AAEnD,uEAA8D;AAE9D,6CAAsC;AACtC,2DAAiE;AAEjE,+EAAsE;AAqDtE,MAAa,WAAW;IAgBtB,YAAY,EACV,KAAK,GAAG,UAAU,CAAC,KAAK,EAExB,UAAU,EACV,YAAY,EAEZ,QAAQ,GAAG,SAAS,EACpB,cAAc,GAAG,IAAI,uCAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAC/D,WAAW,GAAG,SAAS,EACvB,gC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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,IAAI,kCAAa,CAAC,UAAU,CAAC,CAAA;IACtC,CAAC;CACF;AAraD,kCAqaC"}
|
package/dist/oauth-resolver.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
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
|
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?:
|
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?:
|
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,
|
1
|
+
{"version":3,"file":"oauth-resolver.d.ts","sourceRoot":"","sources":["../src/oauth-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,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,mBAAmB,GAAG,gBAAgB,GAAG,sBAAsB,CAAA;AAE3E,qBAAa,aAAa;IAEtB,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB;IAC3C,QAAQ,CAAC,iCAAiC,EAAE,sCAAsC;IAClF,QAAQ,CAAC,mCAAmC,EAAE,wCAAwC;gBAF7E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