@atproto/oauth-provider 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +29 -0
- package/dist/account/account.d.ts +6 -2
- package/dist/account/account.d.ts.map +1 -1
- package/dist/assets/app/bundle-manifest.json +3 -3
- package/dist/assets/app/main.css +1 -1
- package/dist/assets/app/main.js +1 -1
- package/dist/assets/app/main.js.map +1 -1
- package/dist/assets/assets-middleware.d.ts +2 -1
- package/dist/assets/assets-middleware.d.ts.map +1 -1
- package/dist/assets/assets-middleware.js +7 -0
- package/dist/assets/assets-middleware.js.map +1 -1
- package/dist/client/client-manager.d.ts +4 -3
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +60 -37
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +1 -3
- package/dist/client/client.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/device/device-manager.d.ts +1 -1
- package/dist/device/device-manager.d.ts.map +1 -1
- package/dist/device/device-manager.js +2 -2
- package/dist/device/device-manager.js.map +1 -1
- package/dist/errors/invalid-authorization-details-error.d.ts +4 -3
- package/dist/errors/invalid-authorization-details-error.d.ts.map +1 -1
- package/dist/errors/invalid-authorization-details-error.js +4 -4
- package/dist/errors/invalid-authorization-details-error.js.map +1 -1
- package/dist/lib/http/request.d.ts +3 -0
- package/dist/lib/http/request.d.ts.map +1 -1
- package/dist/lib/http/request.js +24 -12
- package/dist/lib/http/request.js.map +1 -1
- package/dist/metadata/build-metadata.d.ts +0 -1
- package/dist/metadata/build-metadata.d.ts.map +1 -1
- package/dist/metadata/build-metadata.js +9 -35
- package/dist/metadata/build-metadata.js.map +1 -1
- package/dist/oauth-hooks.d.ts +3 -10
- package/dist/oauth-hooks.d.ts.map +1 -1
- package/dist/oauth-provider.d.ts +8 -13
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +169 -109
- package/dist/oauth-provider.js.map +1 -1
- package/dist/oauth-verifier.d.ts +1 -2
- package/dist/oauth-verifier.d.ts.map +1 -1
- package/dist/oauth-verifier.js.map +1 -1
- package/dist/output/build-authorize-data.d.ts +6 -0
- package/dist/output/build-authorize-data.d.ts.map +1 -1
- package/dist/output/build-authorize-data.js +1 -0
- package/dist/output/build-authorize-data.js.map +1 -1
- package/dist/replay/replay-manager.d.ts +1 -0
- package/dist/replay/replay-manager.d.ts.map +1 -1
- package/dist/replay/replay-manager.js +3 -0
- package/dist/replay/replay-manager.js.map +1 -1
- package/dist/replay/replay-store.d.ts +1 -1
- package/dist/request/request-info.d.ts +2 -0
- package/dist/request/request-info.d.ts.map +1 -1
- package/dist/request/request-manager.d.ts +3 -9
- package/dist/request/request-manager.d.ts.map +1 -1
- package/dist/request/request-manager.js +52 -77
- package/dist/request/request-manager.js.map +1 -1
- package/dist/request/types.d.ts +10 -10
- package/dist/signer/signed-token-payload.d.ts +85 -85
- package/dist/signer/signer.d.ts +23 -30
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +0 -40
- package/dist/signer/signer.js.map +1 -1
- package/dist/token/token-claims.d.ts +81 -81
- package/dist/token/token-manager.d.ts +1 -2
- package/dist/token/token-manager.d.ts.map +1 -1
- package/dist/token/token-manager.js +10 -37
- package/dist/token/token-manager.js.map +1 -1
- package/dist/token/types.d.ts +10 -10
- package/package.json +2 -3
- package/src/account/account.ts +11 -7
- package/src/assets/app/backend-data.ts +9 -2
- package/src/assets/app/components/accept-form.tsx +65 -51
- package/src/assets/app/components/client-name.tsx +24 -16
- package/src/assets/app/components/url-viewer.tsx +3 -3
- package/src/assets/app/views/accept-view.tsx +7 -4
- package/src/assets/app/views/authorize-view.tsx +2 -1
- package/src/assets/assets-middleware.ts +14 -2
- package/src/client/client-manager.ts +78 -60
- package/src/client/client.ts +1 -4
- package/src/constants.ts +3 -0
- package/src/device/device-manager.ts +7 -1
- package/src/errors/invalid-authorization-details-error.ts +9 -4
- package/src/lib/http/request.ts +61 -15
- package/src/metadata/build-metadata.ts +9 -42
- package/src/oauth-hooks.ts +3 -13
- package/src/oauth-provider.ts +181 -159
- package/src/oauth-verifier.ts +1 -2
- package/src/output/build-authorize-data.ts +8 -0
- package/src/replay/replay-manager.ts +9 -0
- package/src/replay/replay-store.ts +1 -1
- package/src/request/request-info.ts +2 -0
- package/src/request/request-manager.ts +81 -107
- package/src/signer/signer.ts +0 -63
- package/src/token/token-manager.ts +8 -41
- package/dist/oidc/claims.d.ts +0 -16
- package/dist/oidc/claims.d.ts.map +0 -1
- package/dist/oidc/claims.js +0 -29
- package/dist/oidc/claims.js.map +0 -1
- package/dist/oidc/userinfo.d.ts +0 -7
- package/dist/oidc/userinfo.d.ts.map +0 -1
- package/dist/oidc/userinfo.js +0 -3
- package/dist/oidc/userinfo.js.map +0 -1
- package/dist/parameters/claims-requested.d.ts +0 -3
- package/dist/parameters/claims-requested.d.ts.map +0 -1
- package/dist/parameters/claims-requested.js +0 -77
- package/dist/parameters/claims-requested.js.map +0 -1
- package/dist/parameters/oidc-payload.d.ts +0 -31
- package/dist/parameters/oidc-payload.d.ts.map +0 -1
- package/dist/parameters/oidc-payload.js +0 -25
- package/dist/parameters/oidc-payload.js.map +0 -1
- package/src/assets/app/components/client-identifier.tsx +0 -31
- package/src/oidc/claims.ts +0 -35
- package/src/oidc/userinfo.ts +0 -11
- package/src/parameters/claims-requested.ts +0 -106
- package/src/parameters/oidc-payload.ts +0 -28
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"assets-middleware.d.ts","sourceRoot":"","sources":["../../src/assets/assets-middleware.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"assets-middleware.d.ts","sourceRoot":"","sources":["../../src/assets/assets-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIX,MAAM,sBAAsB,CAAA;AAI7B,wBAAgB,yBAAyB,IAAI,UAAU,CAkCtD"}
|
@@ -16,6 +16,13 @@ function authorizeAssetsMiddleware() {
|
|
16
16
|
const asset = await (0, index_js_2.getAsset)(filename).catch(() => null);
|
17
17
|
if (!asset)
|
18
18
|
return next();
|
19
|
+
try {
|
20
|
+
(0, index_js_1.validateFetchSite)(req, res, ['same-origin']);
|
21
|
+
(0, index_js_1.validateFetchDest)(req, res, ['style', 'script']);
|
22
|
+
}
|
23
|
+
catch (err) {
|
24
|
+
return next(err);
|
25
|
+
}
|
19
26
|
if (req.headers['if-none-match'] === asset.sha256) {
|
20
27
|
return void res.writeHead(304).end();
|
21
28
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"assets-middleware.js","sourceRoot":"","sources":["../../src/assets/assets-middleware.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"assets-middleware.js","sourceRoot":"","sources":["../../src/assets/assets-middleware.ts"],"names":[],"mappings":";;;AAAA,mDAK6B;AAE7B,yCAAwD;AAExD,SAAgB,yBAAyB;IACvC,OAAO,KAAK,UAAU,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;QACnD,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM;YAAE,OAAO,IAAI,EAAE,CAAA;QAChE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,4BAAiB,CAAC;YAAE,OAAO,IAAI,EAAE,CAAA;QAE1D,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAG7C,CAAA;QACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,4BAAiB,CAAC,MAAM,CAAC,CAAA;QACzD,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,EAAE,CAAA;QAE5B,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;QACxD,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,EAAE,CAAA;QAEzB,IAAI,CAAC;YACH,IAAA,4BAAiB,EAAC,GAAG,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,CAAA;YAC5C,IAAA,4BAAiB,EAAC,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;QAClD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC;QAED,IAAI,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;YAClD,OAAO,KAAK,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QACtC,CAAC;QAED,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QAEnC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,qCAAqC,CAAC,CAAA;QACvE,CAAC;QAED,MAAM,IAAA,sBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAC1D,CAAC,CAAA;AACH,CAAC;AAlCD,8DAkCC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Fetch } from '@atproto-labs/fetch';
|
2
2
|
import { CachedGetter, SimpleStore } from '@atproto-labs/simple-store';
|
3
3
|
import { Jwks, Keyset } from '@atproto/jwk';
|
4
|
-
import { OAuthClientIdDiscoverable, OAuthClientIdLoopback, OAuthClientMetadata, OAuthClientMetadataInput } from '@atproto/oauth-types';
|
4
|
+
import { OAuthAuthorizationServerMetadata, OAuthClientIdDiscoverable, OAuthClientIdLoopback, OAuthClientMetadata, OAuthClientMetadataInput } from '@atproto/oauth-types';
|
5
5
|
import { Awaitable } from '../lib/util/type.js';
|
6
6
|
import { OAuthHooks } from '../oauth-hooks.js';
|
7
7
|
import { ClientId } from './client-id.js';
|
@@ -9,13 +9,14 @@ import { ClientStore } from './client-store.js';
|
|
9
9
|
import { Client } from './client.js';
|
10
10
|
export type LoopbackMetadataGetter = (url: string) => Awaitable<OAuthClientMetadataInput>;
|
11
11
|
export declare class ClientManager {
|
12
|
+
protected readonly serverMetadata: OAuthAuthorizationServerMetadata;
|
12
13
|
protected readonly keyset: Keyset;
|
13
14
|
protected readonly hooks: OAuthHooks;
|
14
15
|
protected readonly store: ClientStore | null;
|
15
16
|
protected readonly loopbackMetadata: LoopbackMetadataGetter | null;
|
16
17
|
protected readonly jwks: CachedGetter<string, Jwks>;
|
17
|
-
protected readonly
|
18
|
-
constructor(keyset: Keyset, hooks: OAuthHooks, store: ClientStore | null, loopbackMetadata: LoopbackMetadataGetter | null, safeFetch: Fetch, clientJwksCache: SimpleStore<string, Jwks>, clientMetadataCache: SimpleStore<string, OAuthClientMetadata>);
|
18
|
+
protected readonly metadataGetter: CachedGetter<string, OAuthClientMetadata>;
|
19
|
+
constructor(serverMetadata: OAuthAuthorizationServerMetadata, keyset: Keyset, hooks: OAuthHooks, store: ClientStore | null, loopbackMetadata: LoopbackMetadataGetter | null, safeFetch: Fetch, clientJwksCache: SimpleStore<string, Jwks>, clientMetadataCache: SimpleStore<string, OAuthClientMetadata>);
|
19
20
|
/**
|
20
21
|
*
|
21
22
|
* @see {@link https://openid.net/specs/openid-connect-registration-1_0.html#rfc.section.2 OIDC Client Registration}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client-manager.d.ts","sourceRoot":"","sources":["../../src/client/client-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAIN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,YAAY,EAEZ,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAA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yBAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC;cAYf,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,mBAAmB,CAAC;IAS/B;;;;;OAKG;IACH,SAAS,CAAC,sBAAsB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,mBAAmB,GAC5B,mBAAmB;IAmetB,8BAA8B,CAC5B,QAAQ,EAAE,qBAAqB,EAC/B,QAAQ,EAAE,mBAAmB,GAC5B,mBAAmB;IAgDtB,kCAAkC,CAChC,QAAQ,EAAE,yBAAyB,EACnC,QAAQ,EAAE,mBAAmB,GAC5B,mBAAmB;CAqEvB"}
|
@@ -18,13 +18,15 @@ const fetchMetadataHandler = (0, pipe_1.pipe)((0, fetch_1.fetchOkProcessor)(),
|
|
18
18
|
(0, fetch_1.fetchJsonProcessor)('application/json', true), (0, fetch_1.fetchJsonZodProcessor)(oauth_types_1.oauthClientMetadataSchema));
|
19
19
|
const fetchJwksHandler = (0, pipe_1.pipe)((0, fetch_1.fetchOkProcessor)(), (0, fetch_1.fetchJsonProcessor)('application/json', false), (0, fetch_1.fetchJsonZodProcessor)(jwk_1.jwksSchema));
|
20
20
|
class ClientManager {
|
21
|
+
serverMetadata;
|
21
22
|
keyset;
|
22
23
|
hooks;
|
23
24
|
store;
|
24
25
|
loopbackMetadata;
|
25
26
|
jwks;
|
26
|
-
|
27
|
-
constructor(keyset, hooks, store, loopbackMetadata = null, safeFetch, clientJwksCache, clientMetadataCache) {
|
27
|
+
metadataGetter;
|
28
|
+
constructor(serverMetadata, keyset, hooks, store, loopbackMetadata = null, safeFetch, clientJwksCache, clientMetadataCache) {
|
29
|
+
this.serverMetadata = serverMetadata;
|
28
30
|
this.keyset = keyset;
|
29
31
|
this.hooks = hooks;
|
30
32
|
this.store = store;
|
@@ -34,7 +36,7 @@ class ClientManager {
|
|
34
36
|
const jwks = await fetch(buildJsonGetRequest(uri, options)).then(fetchJwksHandler);
|
35
37
|
return jwks;
|
36
38
|
}, clientJwksCache);
|
37
|
-
this.
|
39
|
+
this.metadataGetter = new simple_store_1.CachedGetter(async (uri, options) => {
|
38
40
|
const metadata = await fetch(buildJsonGetRequest(uri, options)).then(fetchMetadataHandler);
|
39
41
|
// Validate within the getter to avoid caching invalid metadata
|
40
42
|
return this.validateClientMetadata(uri, metadata);
|
@@ -96,7 +98,7 @@ class ClientManager {
|
|
96
98
|
}
|
97
99
|
async getDiscoverableClientMetadata(clientId) {
|
98
100
|
const metadataUrl = (0, client_utils_js_1.parseDiscoverableClientId)(clientId);
|
99
|
-
const metadata = await this.
|
101
|
+
const metadata = await this.metadataGetter.get(metadataUrl.href);
|
100
102
|
// Note: we do *not* re-validate the metadata here, as the metadata is
|
101
103
|
// validated within the getter. This is to avoid double validation.
|
102
104
|
//
|
@@ -120,6 +122,17 @@ class ClientManager {
|
|
120
122
|
if (metadata.jwks && metadata.jwks_uri) {
|
121
123
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('jwks_uri and jwks are mutually exclusive');
|
122
124
|
}
|
125
|
+
// Known OIDC specific parameters
|
126
|
+
for (const k of [
|
127
|
+
'default_max_age',
|
128
|
+
'userinfo_signed_response_alg',
|
129
|
+
'id_token_signed_response_alg',
|
130
|
+
'userinfo_encrypted_response_alg',
|
131
|
+
]) {
|
132
|
+
if (metadata[k] != null) {
|
133
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported "${k}" parameter`);
|
134
|
+
}
|
135
|
+
}
|
123
136
|
const clientUriUrl = metadata.client_uri
|
124
137
|
? new URL(metadata.client_uri)
|
125
138
|
: null;
|
@@ -127,17 +140,30 @@ class ClientManager {
|
|
127
140
|
if (clientUriUrl && !clientUriParsed) {
|
128
141
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('client_uri must be a valid URL');
|
129
142
|
}
|
130
|
-
const scopes = metadata.scope?.split(' ');
|
131
|
-
|
132
|
-
|
133
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(
|
143
|
+
const scopes = metadata.scope?.split(' ').filter(Boolean);
|
144
|
+
const dupScope = scopes?.find(isDuplicate);
|
145
|
+
if (dupScope) {
|
146
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Duplicate scope "${dupScope}"`);
|
147
|
+
}
|
148
|
+
if (scopes) {
|
149
|
+
for (const scope of scopes) {
|
150
|
+
// Note, once we have dynamic scopes, this check will need to be
|
151
|
+
// updated to check against the server's supported scopes.
|
152
|
+
if (!this.serverMetadata.scopes_supported?.includes(scope)) {
|
153
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported scope "${scope}"`);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
const dupGrantType = metadata.grant_types.find(isDuplicate);
|
158
|
+
if (dupGrantType) {
|
159
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Duplicate grant type "${dupGrantType}"`);
|
134
160
|
}
|
135
161
|
for (const grantType of metadata.grant_types) {
|
136
162
|
switch (grantType) {
|
137
163
|
case 'authorization_code':
|
138
164
|
case 'refresh_token':
|
139
|
-
case 'implicit': // Required by OIDC (for id_token)
|
140
165
|
continue;
|
166
|
+
case 'implicit':
|
141
167
|
case 'password':
|
142
168
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Grant type "${grantType}" is not allowed`);
|
143
169
|
default:
|
@@ -150,18 +176,6 @@ class ClientManager {
|
|
150
176
|
if (metadata.subject_type && metadata.subject_type !== 'public') {
|
151
177
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Only "public" subject_type is supported');
|
152
178
|
}
|
153
|
-
if (metadata.userinfo_signed_response_alg &&
|
154
|
-
!this.keyset.signAlgorithms.includes(metadata.userinfo_signed_response_alg)) {
|
155
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported "userinfo_signed_response_alg" ${metadata.userinfo_signed_response_alg}`);
|
156
|
-
}
|
157
|
-
if (metadata.id_token_signed_response_alg &&
|
158
|
-
!this.keyset.signAlgorithms.includes(metadata.id_token_signed_response_alg)) {
|
159
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported "id_token_signed_response_alg" ${metadata.id_token_signed_response_alg}`);
|
160
|
-
}
|
161
|
-
if (metadata.userinfo_encrypted_response_alg) {
|
162
|
-
// We only support signature for now.
|
163
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Encrypted userinfo response is not supported');
|
164
|
-
}
|
165
179
|
const method = metadata[`token_endpoint_auth_method`];
|
166
180
|
switch (method) {
|
167
181
|
case undefined:
|
@@ -200,24 +214,18 @@ class ClientManager {
|
|
200
214
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('"dpop_bound_access_tokens" must be true');
|
201
215
|
}
|
202
216
|
for (const responseType of metadata.response_types) {
|
203
|
-
|
217
|
+
if (responseType.includes('id_token')) {
|
218
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`OpenID Connect response type "${responseType}" is not supported`);
|
219
|
+
}
|
204
220
|
// ATPROTO spec requires the use of PKCE
|
205
|
-
if (
|
206
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(
|
221
|
+
if (responseType !== 'code') {
|
222
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported response type "${responseType}"`);
|
207
223
|
}
|
208
224
|
// Consistency check
|
209
|
-
if (
|
225
|
+
if (responseType === 'code' &&
|
210
226
|
!metadata.grant_types.includes('authorization_code')) {
|
211
227
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Response type "${responseType}" requires the "authorization_code" grant type`);
|
212
228
|
}
|
213
|
-
// Asking for "code token" or "code id_token" is fine (as long as the
|
214
|
-
// grant_types includes "authorization_code" and the scope includes
|
215
|
-
// "openid"). Asking for "token" or "id_token" (without "code") requires
|
216
|
-
// the "implicit" grant type.
|
217
|
-
if ((rt.includes('token') || rt.includes('id_token')) &&
|
218
|
-
!metadata.grant_types.includes('implicit')) {
|
219
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Response type "${responseType}" requires the "implicit" grant type`);
|
220
|
-
}
|
221
229
|
}
|
222
230
|
if (metadata.application_type === 'native') {
|
223
231
|
// https://datatracker.ietf.org/doc/html/rfc8252#section-8.4
|
@@ -230,11 +238,23 @@ class ClientManager {
|
|
230
238
|
// > client registration details in order to identify and process requests
|
231
239
|
// > accordingly.
|
232
240
|
}
|
241
|
+
if (metadata.authorization_details_types?.length) {
|
242
|
+
const dupAuthDetailsType = metadata.authorization_details_types.find(isDuplicate);
|
243
|
+
if (dupAuthDetailsType) {
|
244
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Duplicate authorization_details_type "${dupAuthDetailsType}"`);
|
245
|
+
}
|
246
|
+
const authorizationDetailsTypesSupported = this.serverMetadata.authorization_details_types_supported;
|
247
|
+
if (!authorizationDetailsTypesSupported) {
|
248
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('authorization_details_types are not supported');
|
249
|
+
}
|
250
|
+
for (const type of metadata.authorization_details_types) {
|
251
|
+
if (!authorizationDetailsTypesSupported.includes(type)) {
|
252
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported authorization_details_type "${type}"`);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}
|
233
256
|
if (!metadata.redirect_uris?.length) {
|
234
|
-
//
|
235
|
-
//
|
236
|
-
// > OPs can require that request_uri values used be pre-registered with
|
237
|
-
// > the require_request_uri_registration discovery parameter.
|
257
|
+
// ATPROTO spec requires that at least one redirect URI is provided
|
238
258
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('At least one redirect_uri is required');
|
239
259
|
}
|
240
260
|
if (metadata.application_type === 'web' &&
|
@@ -508,6 +528,9 @@ class ClientManager {
|
|
508
528
|
}
|
509
529
|
}
|
510
530
|
exports.ClientManager = ClientManager;
|
531
|
+
function isDuplicate(value, index, array) {
|
532
|
+
return array.includes(value, index + 1);
|
533
|
+
}
|
511
534
|
function reverseDomain(domain) {
|
512
535
|
return domain.split('.').reverse().join('.');
|
513
536
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client-manager.js","sourceRoot":"","sources":["../../src/client/client-manager.ts"],"names":[],"mappings":";;;AAAA,+CAM4B;AAC5B,6CAAyC;AACzC,6DAImC;AACnC,sCAAuD;AACvD,sDAU6B;AAE7B,kDAAqE;AACrE,iGAAuF;AACvF,2FAAiF;AACjF,6DAAqD;AACrD,yDAAqE;AAKrE,uDAA+E;AAC/E,2CAAoC;AAEpC,MAAM,oBAAoB,GAAG,IAAA,WAAI,EAC/B,IAAA,wBAAgB,GAAE;AAClB,8IAA8I;AAC9I,IAAA,0BAAkB,EAAC,kBAAkB,EAAE,IAAI,CAAC,EAC5C,IAAA,6BAAqB,EAAC,uCAAyB,CAAC,CACjD,CAAA;AAED,MAAM,gBAAgB,GAAG,IAAA,WAAI,EAC3B,IAAA,wBAAgB,GAAE,EAClB,IAAA,0BAAkB,EAAC,kBAAkB,EAAE,KAAK,CAAC,EAC7C,IAAA,6BAAqB,EAAC,gBAAU,CAAC,CAClC,CAAA;AAMD,MAAa,aAAa;IAKH;IACA;IACA;IACA;IAPF,IAAI,CAA4B;IAChC,QAAQ,CAA2C;IAEtE,YACqB,MAAc,EACd,KAAiB,EACjB,KAAyB,EACzB,mBAAkD,IAAI,EACzE,SAAgB,EAChB,eAA0C,EAC1C,mBAA6D;QAN1C,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAY;QACjB,UAAK,GAAL,KAAK,CAAoB;QACzB,qBAAgB,GAAhB,gBAAgB,CAAsC;QAKzE,MAAM,KAAK,GAAG,IAAA,iBAAS,EAAC,SAAS,CAAC,CAAA;QAElC,IAAI,CAAC,IAAI,GAAG,IAAI,2BAAY,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;YAClD,MAAM,IAAI,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H,MAAM,CAAC,QAAQ,CAAC,sBAAsB,uCAAuC;IAE7E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;gBAGzB,EAAE,EAAE,QAAQ,EACZ,QAAQ,EAAE,mBAAmB,EAC7B,IAAI,EAAE,SAAS,GAAG,IAAoB,EACtC,IAAI,EAAE,UAAU;IASrB,mBAAmB,CAAC,GAAG,EAAE,MAAM;cA8B5B,kBAAkB,CAAC,WAAW,GAAG,UAAU,EACzD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GACzC,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;cAOxB,SAAS,CAAC,WAAW,GAAG,UAAU,EAChD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GACzC,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAO/D;;;;OAIG;IACU,iBAAiB,CAC5B,KAAK,EAAE,yBAAyB,EAChC,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAA;KACjB,GACA,OAAO,CAAC;QACT,UAAU,EAAE,UAAU,CAAA;QAEtB,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAC;IAsEF;;;;;OAKG;IACU,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;CA4B1E"}
|
package/dist/client/client.js
CHANGED
@@ -93,6 +93,7 @@ class Client {
|
|
93
93
|
audience: checks.audience,
|
94
94
|
subject: this.id,
|
95
95
|
maxTokenAge: constants_js_1.CLIENT_ASSERTION_MAX_AGE / 1000,
|
96
|
+
requiredClaims: ['jti'],
|
96
97
|
}).catch((err) => {
|
97
98
|
if (err instanceof JOSEError) {
|
98
99
|
const msg = `Validation of "client_assertion" failed: ${err.message}`;
|
@@ -103,9 +104,6 @@ class Client {
|
|
103
104
|
if (!result.protectedHeader.kid) {
|
104
105
|
throw new invalid_client_error_js_1.InvalidClientError(`"kid" required in client_assertion`);
|
105
106
|
}
|
106
|
-
if (!result.payload.jti) {
|
107
|
-
throw new invalid_client_error_js_1.InvalidClientError(`"jti" required in client_assertion`);
|
108
|
-
}
|
109
107
|
const clientAuth = {
|
110
108
|
method: oauth_types_1.CLIENT_ASSERTION_TYPE_JWT_BEARER,
|
111
109
|
jkt: await (0, client_auth_js_1.authJwkThumbprint)(result.key),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":";;;AACA,sDAI6B;AAC7B,+BAaa;AAEb,kDAAuE;AACvE,+EAAsE;AACtE,iGAAuF;AACvF,iFAAwE;AACxE,qDAAgE;AAIhE,MAAM,EAAE,SAAS,EAAE,GAAG,aAAM,CAAA;AAE5B,MAAa,MAAM;IASC;IACA;IACA;IACA;IAXlB;;OAEG;IACH,MAAM,CAAU,sBAAsB,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAU,CAAA;IAE5D,SAAS,CAAiB;IAE3C,YACkB,EAAY,EACZ,QAA6B,EAC7B,OAAyB,QAAQ,CAAC,IAAI,EACtC,IAAgB;QAHhB,OAAE,GAAF,EAAE,CAAU;QACZ,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,SAAI,GAAJ,IAAI,CAAkC;QACtC,SAAI,GAAJ,IAAI,CAAY;QAEhC,2EAA2E;QAC3E,IAAI,CAAC,SAAS;YACZ,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ;gBACxB,CAAC,CAAC,IAAA,wBAAiB,EAAC,IAAI,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;gBACzC,CAAC,CAAC,IAAA,yBAAkB,EAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;IAC1D,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,GA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b,+CAA+C;gBAC7C,MAAM,CAAC,sBAAsB;aAC9B,EAAE,CACJ,CAAA;QACH,CAAC;QAED,MAAM,IAAI,6DAA0B,CAClC,2CAA2C,MAAM,GAAG,CACrD,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,kBAAkB,CAAC,UAAsB;QACpD,IAAI,UAAU,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,4BAA4B,CAAC,KAAK,MAAM,CAAA;QAC/D,CAAC;QAED,IAAI,UAAU,CAAC,MAAM,KAAK,8CAAgC,EAAE,CAAC;YAC3D,IAAI,IAAI,CAAC,QAAQ,CAAC,4BAA4B,CAAC,KAAK,iBAAiB,EAAE,CAAC;gBACtE,OAAO,KAAK,CAAA;YACd,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAC9B;oBACE,GAAG,EAAE,UAAU,CAAC,GAAG;oBACnB,GAAG,EAAE,UAAU,CAAC,GAAG;iBACpB,EACD,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAC/B,CAAA;gBACD,MAAM,GAAG,GAAG,MAAM,IAAA,kCAAiB,EAAC,GAAG,CAAC,CAAA;gBAExC,OAAO,GAAG,KAAK,UAAU,CAAC,GAAG,CAAA;YAC/B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QAED,mBAAmB;QACnB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IAC1D,CAAC;;AA5LH,wBA6LC"}
|
package/dist/constants.d.ts
CHANGED
@@ -39,4 +39,6 @@ export declare const CLIENT_ASSERTION_MAX_AGE: number;
|
|
39
39
|
export declare const DPOP_NONCE_MAX_AGE: number;
|
40
40
|
/** 5 seconds */
|
41
41
|
export declare const SESSION_FIXATION_MAX_AGE: number;
|
42
|
+
/** 1 day */
|
43
|
+
export declare const CODE_CHALLENGE_REPLAY_TIMEFRAME: number;
|
42
44
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,eAAO,MAAM,iBAAiB,SAAS,CAAA;AACvC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAC1C,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAE5C,eAAO,MAAM,eAAe,SAAS,CAAA;AACrC,eAAO,MAAM,qBAAqB,KAAK,CAAA;AAEvC,eAAO,MAAM,iBAAiB,SAAS,CAAA;AACvC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC,eAAO,MAAM,mCAAmC,OAAO,CAAA;AAUvD,aAAa;AACb,eAAO,MAAM,sBAAsB,QAAU,CAAA;AAE7C,iBAAiB;AACjB,eAAO,MAAM,aAAa,QAAc,CAAA;AAExC,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,QAAa,CAAA;AAE1D,eAAe;AACf,eAAO,MAAM,wCAAwC,QAAY,CAAA;AAEjE,aAAa;AACb,eAAO,MAAM,0CAA0C,QAAU,CAAA;AAEjE,aAAa;AACb,eAAO,MAAM,gCAAgC,QAAW,CAAA;AAExD,aAAa;AACb,eAAO,MAAM,8BAA8B,QAAW,CAAA;AAEtD,gBAAgB;AAChB,eAAO,MAAM,cAAc,QAAa,CAAA;AAExC;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAc,CAAA;AAEtC,eAAe;AACf,eAAO,MAAM,wBA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AAO,MAAM,kBAAkB,QAAa,CAAA;AAE5C,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,QAAa,CAAA;AAElD,YAAY;AACZ,eAAO,MAAM,+BAA+B,QAAU,CAAA"}
|
package/dist/constants.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
// The purpose of the prefix is to provide type safety
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.SESSION_FIXATION_MAX_AGE = exports.DPOP_NONCE_MAX_AGE = exports.CLIENT_ASSERTION_MAX_AGE = exports.JAR_MAX_AGE = exports.PAR_EXPIRES_IN = exports.AUTHENTICATED_REFRESH_LIFETIME = exports.UNAUTHENTICATED_REFRESH_LIFETIME = exports.UNAUTHENTICATED_REFRESH_INACTIVITY_TIMEOUT = exports.AUTHENTICATED_REFRESH_INACTIVITY_TIMEOUT = exports.AUTHORIZATION_INACTIVITY_TIMEOUT = exports.TOKEN_MAX_AGE = exports.AUTHENTICATION_MAX_AGE = exports.ALLOW_LOOPBACK_CLIENT_REFRESH_TOKEN = exports.CODE_BYTES_LENGTH = exports.CODE_PREFIX = exports.REQUEST_ID_BYTES_LENGTH = exports.REQUEST_ID_PREFIX = exports.TOKEN_ID_BYTES_LENGTH = exports.TOKEN_ID_PREFIX = exports.REFRESH_TOKEN_BYTES_LENGTH = exports.REFRESH_TOKEN_PREFIX = exports.SESSION_ID_BYTES_LENGTH = exports.SESSION_ID_PREFIX = exports.DEVICE_ID_BYTES_LENGTH = exports.DEVICE_ID_PREFIX = void 0;
|
4
|
+
exports.CODE_CHALLENGE_REPLAY_TIMEFRAME = exports.SESSION_FIXATION_MAX_AGE = exports.DPOP_NONCE_MAX_AGE = exports.CLIENT_ASSERTION_MAX_AGE = exports.JAR_MAX_AGE = exports.PAR_EXPIRES_IN = exports.AUTHENTICATED_REFRESH_LIFETIME = exports.UNAUTHENTICATED_REFRESH_LIFETIME = exports.UNAUTHENTICATED_REFRESH_INACTIVITY_TIMEOUT = exports.AUTHENTICATED_REFRESH_INACTIVITY_TIMEOUT = exports.AUTHORIZATION_INACTIVITY_TIMEOUT = exports.TOKEN_MAX_AGE = exports.AUTHENTICATION_MAX_AGE = exports.ALLOW_LOOPBACK_CLIENT_REFRESH_TOKEN = exports.CODE_BYTES_LENGTH = exports.CODE_PREFIX = exports.REQUEST_ID_BYTES_LENGTH = exports.REQUEST_ID_PREFIX = exports.TOKEN_ID_BYTES_LENGTH = exports.TOKEN_ID_PREFIX = exports.REFRESH_TOKEN_BYTES_LENGTH = exports.REFRESH_TOKEN_PREFIX = exports.SESSION_ID_BYTES_LENGTH = exports.SESSION_ID_PREFIX = exports.DEVICE_ID_BYTES_LENGTH = exports.DEVICE_ID_PREFIX = void 0;
|
5
5
|
exports.DEVICE_ID_PREFIX = 'dev-';
|
6
6
|
exports.DEVICE_ID_BYTES_LENGTH = 16; // 128 bits
|
7
7
|
exports.SESSION_ID_PREFIX = 'ses-';
|
@@ -50,4 +50,6 @@ exports.CLIENT_ASSERTION_MAX_AGE = 1 * MINUTE;
|
|
50
50
|
exports.DPOP_NONCE_MAX_AGE = 3 * MINUTE;
|
51
51
|
/** 5 seconds */
|
52
52
|
exports.SESSION_FIXATION_MAX_AGE = 5 * SECOND;
|
53
|
+
/** 1 day */
|
54
|
+
exports.CODE_CHALLENGE_REPLAY_TIMEFRAME = 1 * DAY;
|
53
55
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,sDAAsD;;;AAEzC,QAAA,gBAAgB,GAAG,MAAM,CAAA;AACzB,QAAA,sBAAsB,GAAG,EAAE,CAAA,CAAC,WAAW;AAEvC,QAAA,iBAAiB,GAAG,MAAM,CAAA;AAC1B,QAAA,uBAAuB,GAAG,EAAE,CAAA,CAAC,8CAA8C;AAE3E,QAAA,oBAAoB,GAAG,MAAM,C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C,GAAG,GAAG,CAAA;AAE7C,iBAAiB;AACJ,QAAA,aAAa,GAAG,EAAE,GAAG,MAAM,CAAA;AAExC,gBAAgB;AACH,QAAA,gCAAgC,GAAG,CAAC,GAAG,MAAM,CAAA;AAE1D,eAAe;AACF,QAAA,wCAAwC,GAAG,CAAC,GAAG,KAAK,CAAA;AAEjE,aAAa;AACA,QAAA,0CAA0C,GAAG,CAAC,GAAG,GAAG,CAAA;AAEjE,aAAa;AACA,QAAA,gCAAgC,GAAG,CAAC,GAAG,IAAI,CAAA;AAExD,aAAa;AACA,QAAA,8BAA8B,GAAG,CAAC,GAAG,IAAI,CAAA;AAEtD,gBAAgB;AACH,QAAA,cAAc,GAAG,CAAC,GAAG,MAAM,CAAA;AAExC;;;;GAIG;AACU,QAAA,WAAW,GAAG,EAAE,GAAG,MAAM,CAAA;AAEtC,eAAe;AACF,QAAA,wBAAwB,GAAG,CAAC,GAAG,MAAM,CAAA;AAElD,gBAAgB;AACH,QAAA,kBAAkB,GAAG,CAAC,GAAG,MAAM,CAAA;AAE5C,gBAAgB;AACH,QAAA,wBAAwB,GAAG,CAAC,GAAG,MAAM,CAAA;AAElD,YAAY;AACC,QAAA,+BAA+B,GAAG,CAAC,GAAG,GAAG,CAAA"}
|
@@ -73,7 +73,7 @@ export declare class DeviceManager {
|
|
73
73
|
private readonly store;
|
74
74
|
private readonly options;
|
75
75
|
constructor(store: DeviceStore, options?: DeviceDeviceManagerOptions);
|
76
|
-
load(req: IncomingMessage, res: ServerResponse): Promise<{
|
76
|
+
load(req: IncomingMessage, res: ServerResponse, forceRotate?: boolean): Promise<{
|
77
77
|
deviceId: DeviceId;
|
78
78
|
}>;
|
79
79
|
private create;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"device-manager.d.ts","sourceRoot":"","sources":["../../src/device/device-manager.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG3D,OAAO,KAAK,OA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N,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,OAAO,eAAe,CAAA;AAK/D;;;;GAIG;AACH,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,0BAA4C;IAG3D,IAAI,CACf,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,WAAW,UAAQ,GAClB,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC;YAcpB,MAAM;YAuBN,OAAO;IAyCR,MAAM,CACjB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,QAAQ,EAClB,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,YAAY,CAAC,CAAC,GAC3D,OAAO,CAAC,IAAI,CAAC;YAYF,SAAS;IA+BvB,OAAO,CAAC,WAAW;IAuBnB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,gBAAgB;CAGzB"}
|
@@ -80,10 +80,10 @@ class DeviceManager {
|
|
80
80
|
this.store = store;
|
81
81
|
this.options = options;
|
82
82
|
}
|
83
|
-
async load(req, res) {
|
83
|
+
async load(req, res, forceRotate = false) {
|
84
84
|
const cookie = await this.getCookie(req);
|
85
85
|
if (cookie) {
|
86
|
-
return this.refresh(req, res, cookie.value, cookie.mustRotate);
|
86
|
+
return this.refresh(req, res, cookie.value, forceRotate || cookie.mustRotate);
|
87
87
|
}
|
88
88
|
else {
|
89
89
|
return this.create(req, res);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"device-manager.js","sourceRoot":"","sources":["../../src/device/device-manager.ts"],"names":[],"mappings":";;;AAEA,mCAAqD;AAErD,6BAAuB;AAEvB,mDAAqE;AAErE,kDAA0D;AAE1D,2DAA0D;AAC1D,iDA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,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EACjD,aAAa,CACd,CACF,CAAA;QACH,CAAC;IACH,CAAC;IAEO,gBAAgB,CAAC,GAAoB;QAC3C,OAAO,IAAA,wCAAoB,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC3D,CAAC;CACF;AAvMD,sCAuMC"}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAuthenticationRequestParameters } from '@atproto/oauth-types';
|
2
|
+
import { AccessDeniedError } from './access-denied-error.js';
|
2
3
|
/**
|
3
4
|
* @see
|
4
5
|
* {@link https://datatracker.ietf.org/doc/html/rfc9396#section-14.6 | RFC 9396 - OAuth Dynamic Client Registration Metadata Registration Error}
|
@@ -14,7 +15,7 @@ import { OAuthError } from './oauth-error.js';
|
|
14
15
|
* - contains fields with invalid values for the authorization details type, or
|
15
16
|
* - is missing required fields for the authorization details type.
|
16
17
|
*/
|
17
|
-
export declare class InvalidAuthorizationDetailsError extends
|
18
|
-
constructor(error_description: string, cause?: unknown);
|
18
|
+
export declare class InvalidAuthorizationDetailsError extends AccessDeniedError {
|
19
|
+
constructor(parameters: OAuthAuthenticationRequestParameters, error_description: string, cause?: unknown);
|
19
20
|
}
|
20
21
|
//# sourceMappingURL=invalid-authorization-details-error.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"invalid-authorization-details-error.d.ts","sourceRoot":"","sources":["../../src/errors/invalid-authorization-details-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"invalid-authorization-details-error.d.ts","sourceRoot":"","sources":["../../src/errors/invalid-authorization-details-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D;;;;;;;;;;;;;;GAcG;AACH,qBAAa,gCAAiC,SAAQ,iBAAiB;gBAEnE,UAAU,EAAE,oCAAoC,EAChD,iBAAiB,EAAE,MAAM,EACzB,KAAK,CAAC,EAAE,OAAO;CAIlB"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.InvalidAuthorizationDetailsError = void 0;
|
4
|
-
const
|
4
|
+
const access_denied_error_js_1 = require("./access-denied-error.js");
|
5
5
|
/**
|
6
6
|
* @see
|
7
7
|
* {@link https://datatracker.ietf.org/doc/html/rfc9396#section-14.6 | RFC 9396 - OAuth Dynamic Client Registration Metadata Registration Error}
|
@@ -17,9 +17,9 @@ const oauth_error_js_1 = require("./oauth-error.js");
|
|
17
17
|
* - contains fields with invalid values for the authorization details type, or
|
18
18
|
* - is missing required fields for the authorization details type.
|
19
19
|
*/
|
20
|
-
class InvalidAuthorizationDetailsError extends
|
21
|
-
constructor(error_description, cause) {
|
22
|
-
super(
|
20
|
+
class InvalidAuthorizationDetailsError extends access_denied_error_js_1.AccessDeniedError {
|
21
|
+
constructor(parameters, error_description, cause) {
|
22
|
+
super(parameters, error_description, 'invalid_authorization_details', cause);
|
23
23
|
}
|
24
24
|
}
|
25
25
|
exports.InvalidAuthorizationDetailsError = InvalidAuthorizationDetailsError;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"invalid-authorization-details-error.js","sourceRoot":"","sources":["../../src/errors/invalid-authorization-details-error.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"invalid-authorization-details-error.js","sourceRoot":"","sources":["../../src/errors/invalid-authorization-details-error.ts"],"names":[],"mappings":";;;AACA,qEAA4D;AAE5D;;;;;;;;;;;;;;GAcG;AACH,MAAa,gCAAiC,SAAQ,0CAAiB;IACrE,YACE,UAAgD,EAChD,iBAAyB,EACzB,KAAe;QAEf,KAAK,CAAC,UAAU,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,KAAK,CAAC,CAAA;IAC9E,CAAC;CACF;AARD,4EAQC"}
|
@@ -24,7 +24,10 @@ export declare function parseRequestPayload<A extends readonly KnownNames[] = re
|
|
24
24
|
name: A[number];
|
25
25
|
}>)["parse"]>>;
|
26
26
|
export declare function validateRequestPayload<S extends z.ZodTypeAny>(req: IncomingMessage, schema: S, allow?: readonly KnownNames[]): Promise<z.infer<S>>;
|
27
|
+
export declare function validateHeaderValue(req: IncomingMessage, name: keyof IncomingMessage['headers'], allowedValues: readonly (string | null)[]): void;
|
27
28
|
export declare function validateFetchMode(req: IncomingMessage, res: ServerResponse, expectedMode: readonly (null | 'navigate' | 'same-origin' | 'no-cors' | 'cors')[]): void;
|
29
|
+
export declare function validateFetchDest(req: IncomingMessage, res: ServerResponse, expectedDest: readonly (null | 'document' | 'embed' | 'font' | 'image' | 'manifest' | 'media' | 'object' | 'report' | 'script' | 'serviceworker' | 'sharedworker' | 'style' | 'worker' | 'xslt')[]): void;
|
30
|
+
export declare function validateFetchSite(req: IncomingMessage, res: ServerResponse, expectedSite: readonly (null | 'same-origin' | 'same-site' | 'cross-site' | 'none')[]): void;
|
28
31
|
export declare function validateReferer(req: IncomingMessage, res: ServerResponse, reference: UrlReference, allowNull?: boolean): void;
|
29
32
|
export declare function setupCsrfToken(req: IncomingMessage, res: ServerResponse, cookieName?: string): Promise<void>;
|
30
33
|
export declare function validateSameOrigin(req: IncomingMessage, res: ServerResponse, origin: string, allowNull?: boolean): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/lib/http/request.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAY,MAAM,UAAU,CAAA;AAEjD,wBA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