@atproto/oauth-provider 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -0
- package/dist/assets/app/bundle-manifest.json +2 -2
- package/dist/assets/app/main.js +3 -3
- package/dist/assets/app/main.js.map +1 -1
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +31 -40
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client.d.ts +2 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +5 -9
- package/dist/client/client.js.map +1 -1
- package/dist/dpop/dpop-manager.d.ts +0 -1
- package/dist/dpop/dpop-manager.d.ts.map +1 -1
- package/dist/dpop/dpop-manager.js +1 -4
- package/dist/dpop/dpop-manager.js.map +1 -1
- package/dist/lib/http/parser.d.ts +13 -7
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/parser.js +29 -9
- package/dist/lib/http/parser.js.map +1 -1
- package/dist/lib/http/request.d.ts +5 -5
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/http/stream.js +3 -2
- package/dist/lib/http/stream.js.map +1 -1
- package/dist/metadata/build-metadata.d.ts.map +1 -1
- package/dist/metadata/build-metadata.js +0 -14
- package/dist/metadata/build-metadata.js.map +1 -1
- package/dist/oauth-provider.d.ts +2 -2
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +7 -5
- package/dist/oauth-provider.js.map +1 -1
- package/dist/request/types.d.ts +4 -4
- package/dist/signer/signed-token-payload.d.ts +3 -3
- package/dist/signer/signer.d.ts +1 -1
- package/dist/token/token-claims.d.ts +3 -3
- package/package.json +3 -2
- package/src/client/client-manager.ts +46 -60
- package/src/client/client.ts +4 -13
- package/src/dpop/dpop-manager.ts +1 -6
- package/src/lib/http/parser.ts +37 -13
- package/src/lib/http/stream.ts +5 -2
- package/src/metadata/build-metadata.ts +0 -14
- package/src/oauth-provider.ts +6 -18
@@ -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,EAAE,IAAI,EAAc,MAAM,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,
|
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,EAAE,IAAI,EAAc,MAAM,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAKL,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EAEzB,MAAM,sBAAsB,CAAA;AAO7B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAepC,MAAM,MAAM,sBAAsB,GAAG,CACnC,GAAG,EAAE,MAAM,KACR,SAAS,CAAC,wBAAwB,CAAC,CAAA;AAExC,qBAAa,aAAa;IAKtB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACjC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU;IACpC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAC5C,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,IAAI;IAPpE,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACnD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;gBAGjD,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,gBAAgB,EAAE,sBAAsB,GAAG,IAAW,EACzE,SAAS,EAAE,KAAK,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,EAC1C,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAsB/D;;;OAGG;IACU,SAAS,CAAC,QAAQ,EAAE,MAAM;cA+BvB,iBAAiB,CAC/B,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,mBAAmB,CAAC;cAYf,yBAAyB,CACvC,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,mBAAmB,CAAC;cAiBf,6BAA6B,CAC3C,QAAQ,EAAE,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;IAydtB,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"}
|
@@ -162,32 +162,28 @@ class ClientManager {
|
|
162
162
|
// We only support signature for now.
|
163
163
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Encrypted userinfo response is not supported');
|
164
164
|
}
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
metadata
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
break;
|
188
|
-
default:
|
189
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`${method} is not a supported "${endpoint}_endpoint_auth_method". Use "private_key_jwt" or "none".`);
|
190
|
-
}
|
165
|
+
const method = metadata[`token_endpoint_auth_method`];
|
166
|
+
switch (method) {
|
167
|
+
case undefined:
|
168
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Missing token_endpoint_auth_method client metadata');
|
169
|
+
case 'none':
|
170
|
+
if (metadata.token_endpoint_auth_signing_alg) {
|
171
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`token_endpoint_auth_method "none" must not have token_endpoint_auth_signing_alg`);
|
172
|
+
}
|
173
|
+
break;
|
174
|
+
case 'private_key_jwt':
|
175
|
+
if (!metadata.jwks && !metadata.jwks_uri) {
|
176
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`private_key_jwt auth method requires jwks or jwks_uri`);
|
177
|
+
}
|
178
|
+
if (metadata.jwks?.keys.length === 0) {
|
179
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`private_key_jwt auth method requires at least one key in jwks`);
|
180
|
+
}
|
181
|
+
if (!metadata.token_endpoint_auth_signing_alg) {
|
182
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Missing token_endpoint_auth_signing_alg client metadata`);
|
183
|
+
}
|
184
|
+
break;
|
185
|
+
default:
|
186
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`${method} is not a supported "token_endpoint_auth_method". Use "private_key_jwt" or "none".`);
|
191
187
|
}
|
192
188
|
if (metadata.authorization_encrypted_response_enc) {
|
193
189
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Encrypted authorization response is not supported');
|
@@ -449,12 +445,9 @@ class ClientManager {
|
|
449
445
|
metadata.grant_types.includes('refresh_token')) {
|
450
446
|
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError('Loopback clients are not allowed to use the "refresh_token" grant type');
|
451
447
|
}
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
if (method !== 'none') {
|
456
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Loopback clients are not allowed to use "${endpoint}_endpoint_auth_method" ${method}`);
|
457
|
-
}
|
448
|
+
const method = metadata[`token_endpoint_auth_method`];
|
449
|
+
if (method !== 'none') {
|
450
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Loopback clients are not allowed to use "token_endpoint_auth_method" ${method}`);
|
458
451
|
}
|
459
452
|
for (const redirectUri of metadata.redirect_uris) {
|
460
453
|
const url = (0, client_utils_js_1.parseRedirectUri)(redirectUri);
|
@@ -490,14 +483,12 @@ class ClientManager {
|
|
490
483
|
}
|
491
484
|
}
|
492
485
|
}
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Client authentication method "${method}" is not allowed for discoverable clients`);
|
500
|
-
}
|
486
|
+
const method = metadata[`token_endpoint_auth_method`];
|
487
|
+
switch (method) {
|
488
|
+
case 'client_secret_post':
|
489
|
+
case 'client_secret_basic':
|
490
|
+
case 'client_secret_jwt':
|
491
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Client authentication method "${method}" is not allowed for discoverable clients`);
|
501
492
|
}
|
502
493
|
for (const redirectUri of metadata.redirect_uris) {
|
503
494
|
const url = (0, client_utils_js_1.parseRedirectUri)(redirectUri);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client-manager.js","sourceRoot":"","sources":["../../src/client/client-manager.ts"],"names":[],"mappings":";;;AAAA,+CAM4B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C,GAAG,CAAC,EAAE,CAAC;gBAC/B,kIAAkI;gBAClI,EAAE;gBACF,kEAAkE;gBAClE,mEAAmE;gBACnE,yDAAyD;gBACzD,MAAM,QAAQ,GAAG,GAAG,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAA;gBAC1D,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBAC9B,MAAM,IAAI,uDAAuB,CAC/B,6JAA6J,QAAQ,GAAG,CACzK,CAAA;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AA3tBD,sCA2tBC;AAED,SAAS,aAAa,CAAC,MAAc;IACnC,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9C,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAQ;IACrC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACnC,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW,EAAE,OAA0B;IAClE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;IAC7D,IAAI,OAAO,EAAE,OAAO;QAAE,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;IAC9D,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE;QACtB,OAAO;QACP,MAAM,EAAE,OAAO,EAAE,MAAM;QACvB,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/client/client.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Jwks } from '@atproto/jwk';
|
2
|
-
import { OAuthClientIdentification, OAuthClientMetadata
|
2
|
+
import { OAuthClientIdentification, OAuthClientMetadata } from '@atproto/oauth-types';
|
3
3
|
import { type JWTPayload, type JWTVerifyOptions, type JWTVerifyResult, type KeyLike, type ResolvedKey, type UnsecuredResult } from 'jose';
|
4
4
|
import { ClientAuth } from './client-auth.js';
|
5
5
|
import { ClientId } from './client-id.js';
|
@@ -18,13 +18,12 @@ export declare class Client {
|
|
18
18
|
decodeRequestObject(jar: string): Promise<UnsecuredResult<JWTPayload> | (JWTVerifyResult<JWTPayload> & ResolvedKey<KeyLike>)>;
|
19
19
|
protected jwtVerifyUnsecured<PayloadType = JWTPayload>(token: string, options?: Omit<JWTVerifyOptions, 'issuer'>): Promise<UnsecuredResult<PayloadType>>;
|
20
20
|
protected jwtVerify<PayloadType = JWTPayload>(token: string, options?: Omit<JWTVerifyOptions, 'issuer'>): Promise<JWTVerifyResult<PayloadType> & ResolvedKey<KeyLike>>;
|
21
|
-
protected getAuthMethod(endpoint: OAuthEndpointName): "none" | "private_key_jwt" | "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
|
22
21
|
/**
|
23
22
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1}
|
24
23
|
* @see {@link https://datatracker.ietf.org/doc/html/draft-ietf-oauth-jwt-bearer-11#section-3}
|
25
24
|
* @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}
|
26
25
|
*/
|
27
|
-
verifyCredentials(input: OAuthClientIdentification,
|
26
|
+
verifyCredentials(input: OAuthClientIdentification, checks: {
|
28
27
|
audience: string;
|
29
28
|
}): Promise<{
|
30
29
|
clientAuth: ClientAuth;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAEL,yBAAyB,EACzB,mBAAmB,
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"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iB,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;IAyEF;;;;;OAKG;IACU,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;CA4B1E"}
|
package/dist/client/client.js
CHANGED
@@ -70,17 +70,13 @@ class Client {
|
|
70
70
|
issuer: this.id,
|
71
71
|
});
|
72
72
|
}
|
73
|
-
getAuthMethod(endpoint) {
|
74
|
-
return (this.metadata[`${endpoint}_endpoint_auth_method`] ||
|
75
|
-
this.metadata[`token_endpoint_auth_method`]);
|
76
|
-
}
|
77
73
|
/**
|
78
74
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1}
|
79
75
|
* @see {@link https://datatracker.ietf.org/doc/html/draft-ietf-oauth-jwt-bearer-11#section-3}
|
80
76
|
* @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}
|
81
77
|
*/
|
82
|
-
async verifyCredentials(input,
|
83
|
-
const method = this.
|
78
|
+
async verifyCredentials(input, checks) {
|
79
|
+
const method = this.metadata[`token_endpoint_auth_method`];
|
84
80
|
if (method === 'none') {
|
85
81
|
const clientAuth = { method: 'none' };
|
86
82
|
return { clientAuth };
|
@@ -127,7 +123,7 @@ class Client {
|
|
127
123
|
Client.AUTH_METHODS_SUPPORTED,
|
128
124
|
]}`);
|
129
125
|
}
|
130
|
-
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported
|
126
|
+
throw new invalid_client_metadata_error_js_1.InvalidClientMetadataError(`Unsupported token_endpoint_auth_method "${method}"`);
|
131
127
|
}
|
132
128
|
/**
|
133
129
|
* Ensures that a {@link ClientAuth} generated in the past is still valid wrt
|
@@ -137,10 +133,10 @@ class Client {
|
|
137
133
|
*/
|
138
134
|
async validateClientAuth(clientAuth) {
|
139
135
|
if (clientAuth.method === 'none') {
|
140
|
-
return this.
|
136
|
+
return this.metadata[`token_endpoint_auth_method`] === 'none';
|
141
137
|
}
|
142
138
|
if (clientAuth.method === oauth_types_1.CLIENT_ASSERTION_TYPE_JWT_BEARER) {
|
143
|
-
if (this.
|
139
|
+
if (this.metadata[`token_endpoint_auth_method`] !== 'private_key_jwt') {
|
144
140
|
return false;
|
145
141
|
}
|
146
142
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":";;;AACA,
|
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,C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AU,CACd,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,MAAM,EAAE,cAAc;IAC3B,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW;IAC9B,WAAW,CAAC,EAAE,MAAM;;;iBAWb,MAAM;iBACN,MAAM
|
1
|
+
{"version":3,"file":"dpop-manager.d.ts","sourceRoot":"","sources":["../../src/dpop/dpop-manager.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAI3D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAA;AACzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,KAAK,GAAG,cAAc,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,qBAAa,WAAW;IACtB,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAA;gBAE5B,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAE,kBAAuB;IAK7D,SAAS,IAAI,MAAM,GAAG,SAAS;IAI/B;;OAEG;IACG,UAAU,CACd,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,MAAM,EAAE,cAAc;IAC3B,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW;IAC9B,WAAW,CAAC,EAAE,MAAM;;;iBAWb,MAAM;iBACN,MAAM;;;;CAgEhB"}
|
@@ -34,7 +34,7 @@ class DpopManager {
|
|
34
34
|
typ: 'dpop+jwt',
|
35
35
|
maxTokenAge: 10,
|
36
36
|
clockTolerance: constants_js_1.DPOP_NONCE_MAX_AGE / 1e3,
|
37
|
-
requiredClaims: ['iat', '
|
37
|
+
requiredClaims: ['iat', 'jti'],
|
38
38
|
}).catch((err) => {
|
39
39
|
const message = err instanceof JOSEError
|
40
40
|
? `Invalid DPoP proof (${err.message})`
|
@@ -44,9 +44,6 @@ class DpopManager {
|
|
44
44
|
if (!payload.jti || typeof payload.jti !== 'string') {
|
45
45
|
throw new invalid_dpop_proof_error_js_1.InvalidDpopProofError('Invalid or missing jti property');
|
46
46
|
}
|
47
|
-
if (payload.exp - payload.iat > constants_js_1.DPOP_NONCE_MAX_AGE / 3 / 1e3) {
|
48
|
-
throw new invalid_dpop_proof_error_js_1.InvalidDpopProofError('DPoP proof validity too long');
|
49
|
-
}
|
50
47
|
// Note rfc9110#section-9.1 states that the method name is case-sensitive
|
51
48
|
if (!htm || htm !== payload['htm']) {
|
52
49
|
throw new invalid_dpop_proof_error_js_1.InvalidDpopProofError('DPoP htm mismatch');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dpop-manager.js","sourceRoot":"","sources":["../../src/dpop/dpop-manager.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAExC,+BAA6E;AAE7E,kDAAoD;AACpD,uFAA6E;AAC7E,+EAAqE;AACrE,mDAA2D;AAIlD,0FAJA,yBAAS,OAIA;AAFlB,MAAM,EAAE,SAAS,EAAE,GAAG,aAAM,CAAA;AAc5B,MAAa,WAAW;IACH,SAAS,CAAY;IAExC,YAAY,EAAE,UAAU,EAAE,QAAQ,KAAyB,EAAE;QAC3D,IAAI,CAAC,SAAS;YACZ,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,yBAAS,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;IAC3E,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,CAAA;IAC/B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CACd,KAAc,EACd,GAAW,EAAE,cAAc;IAC3B,GAAiB,EAAE,WAAW;IAC9B,WAAoB;QAEpB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB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MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QAChC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAA;QACb,GAAG,CAAC,MAAM,GAAG,EAAE,CAAA;QACf,OAAO,GAAG,CAAC,IAAI,CAAA;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
@@ -3,10 +3,16 @@ export type JsonScalar = string | number | boolean | null;
|
|
3
3
|
export type Json = JsonScalar | Json[] | {
|
4
4
|
[_ in string]?: Json;
|
5
5
|
};
|
6
|
+
export declare const parseContentType: (type: string) => ContentType;
|
7
|
+
export type ContentType = {
|
8
|
+
mime: string;
|
9
|
+
charset?: string;
|
10
|
+
boundary?: string;
|
11
|
+
};
|
6
12
|
export type Parser<T extends string = string, R = unknown> = {
|
7
13
|
readonly name: string;
|
8
|
-
readonly test: (
|
9
|
-
readonly parse: (buffer: Buffer) => R;
|
14
|
+
readonly test: (mime: string) => mime is T;
|
15
|
+
readonly parse: (buffer: Buffer, type: ContentType) => R;
|
10
16
|
};
|
11
17
|
export type ParserName<P extends Parser> = P extends {
|
12
18
|
readonly name: infer N;
|
@@ -16,15 +22,15 @@ export type ParserResult<P extends Parser> = ReturnType<P['parse']>;
|
|
16
22
|
export type ParserForType<P extends Parser, T> = P extends Parser<infer U> ? (U extends T ? P : never) : never;
|
17
23
|
export declare const parsers: [{
|
18
24
|
readonly name: "json";
|
19
|
-
readonly test: (
|
20
|
-
readonly parse: (buffer: Buffer) => Json;
|
25
|
+
readonly test: (mime: string) => mime is "application/json" | `application/${string}+json`;
|
26
|
+
readonly parse: (buffer: Buffer, { charset }: ContentType) => Json;
|
21
27
|
}, {
|
22
28
|
readonly name: "urlencoded";
|
23
|
-
readonly test: (
|
24
|
-
readonly parse: (buffer: Buffer) => Partial<Record<string, string>>;
|
29
|
+
readonly test: (mime: string) => mime is "application/x-www-form-urlencoded";
|
30
|
+
readonly parse: (buffer: Buffer, { charset }: ContentType) => Partial<Record<string, string>>;
|
25
31
|
}, {
|
26
32
|
readonly name: "bytes";
|
27
|
-
readonly test: (
|
33
|
+
readonly test: (mime: string) => mime is "application/octet-stream";
|
28
34
|
readonly parse: (buffer: Buffer) => Buffer;
|
29
35
|
}];
|
30
36
|
export type KnownParser = (typeof parsers)[number];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/http/parser.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/http/parser.ts"],"names":[],"mappings":";AAIA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AACzD,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,IAAI,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,IAAI;CAAE,CAAA;AAEjE,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,WAW/C,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO,IAAI;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAA;IAC1C,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,CAAC,CAAA;CACzD,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,GAC3E,CAAC,GACD,KAAK,CAAA;AACT,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAChF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;AAEnE,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAC3C,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAA;AAE/D,eAAO,MAAM,OAAO;;;kEAMc,IAAI;;;;kEAgBJ,QAAQ,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC;;;;wCAiB5C,MAAM;EAEE,CAAA;AAE7B,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAElD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA"}
|
package/dist/lib/http/parser.js
CHANGED
@@ -3,16 +3,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.parsers = void 0;
|
6
|
+
exports.parsers = exports.parseContentType = void 0;
|
7
7
|
const bourne_1 = require("@hapi/bourne");
|
8
|
+
const content_1 = require("@hapi/content");
|
8
9
|
const http_errors_1 = __importDefault(require("http-errors"));
|
10
|
+
const parseContentType = (type) => {
|
11
|
+
try {
|
12
|
+
return (0, content_1.type)(type);
|
13
|
+
}
|
14
|
+
catch (err) {
|
15
|
+
// De-boomify the error
|
16
|
+
if (err?.['isBoom']) {
|
17
|
+
throw (0, http_errors_1.default)(err['output']['statusCode'], err['message']);
|
18
|
+
}
|
19
|
+
throw err;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
exports.parseContentType = parseContentType;
|
9
23
|
exports.parsers = [
|
10
24
|
{
|
11
25
|
name: 'json',
|
12
|
-
test: (
|
13
|
-
return /^application\/(?:.+\+)?json$/.test(
|
26
|
+
test: (mime) => {
|
27
|
+
return /^application\/(?:.+\+)?json$/.test(mime);
|
14
28
|
},
|
15
|
-
parse: (buffer) => {
|
29
|
+
parse: (buffer, { charset }) => {
|
30
|
+
if (charset != null && !/^utf-?8$/i.test(charset)) {
|
31
|
+
throw (0, http_errors_1.default)(415, 'Unsupported charset');
|
32
|
+
}
|
16
33
|
try {
|
17
34
|
return (0, bourne_1.parse)(buffer.toString());
|
18
35
|
}
|
@@ -23,10 +40,13 @@ exports.parsers = [
|
|
23
40
|
},
|
24
41
|
{
|
25
42
|
name: 'urlencoded',
|
26
|
-
test: (
|
27
|
-
return
|
43
|
+
test: (mime) => {
|
44
|
+
return mime === 'application/x-www-form-urlencoded';
|
28
45
|
},
|
29
|
-
parse: (buffer) => {
|
46
|
+
parse: (buffer, { charset }) => {
|
47
|
+
if (charset != null && !/^utf-?8$/i.test(charset)) {
|
48
|
+
throw (0, http_errors_1.default)(415, 'Unsupported charset');
|
49
|
+
}
|
30
50
|
try {
|
31
51
|
if (!buffer.length)
|
32
52
|
return {};
|
@@ -39,8 +59,8 @@ exports.parsers = [
|
|
39
59
|
},
|
40
60
|
{
|
41
61
|
name: 'bytes',
|
42
|
-
test: (
|
43
|
-
return
|
62
|
+
test: (mime) => {
|
63
|
+
return mime === 'application/octet-stream';
|
44
64
|
},
|
45
65
|
parse: (buffer) => buffer,
|
46
66
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/lib/http/parser.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAiD;AACjD,8DA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IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,CAAC,IAAI,EAA+C,EAAE;YAC1D,OAAO,IAAI,KAAK,mCAAmC,CAAA;QACrD,CAAC;QACD,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,EAAmC,EAAE;YAC9D,IAAI,OAAO,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAClD,MAAM,IAAA,qBAAe,EAAC,GAAG,EAAE,qBAAqB,CAAC,CAAA;YACnD,CAAC;YACD,IAAI,CAAC;gBACH,IAAI,CAAC,MAAM,CAAC,MAAM;oBAAE,OAAO,EAAE,CAAA;gBAC7B,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;YACnE,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,IAAA,qBAAe,EAAC,GAAG,EAAE,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;YACxE,CAAC;QACH,CAAC;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,CAAC,IAAI,EAAsC,EAAE;YACjD,OAAO,IAAI,KAAK,0BAA0B,CAAA;QAC5C,CAAC;QACD,KAAK,EAAE,CAAC,MAAM,EAAU,EAAE,CAAC,MAAM;KAClC;CAC0B,CAAA"}
|
@@ -6,19 +6,19 @@ import { IncomingMessage, ServerResponse } from './types.js';
|
|
6
6
|
import { UrlReference } from './url.js';
|
7
7
|
export declare function parseRequestPayload<A extends readonly KnownNames[] = readonly KnownNames[]>(req: IncomingMessage, allow?: A): Promise<ReturnType<(Extract<{
|
8
8
|
readonly name: "json";
|
9
|
-
readonly test: (
|
10
|
-
readonly parse: (buffer: Buffer) => import("./parser.js").Json;
|
9
|
+
readonly test: (mime: string) => mime is "application/json" | `application/${string}+json`;
|
10
|
+
readonly parse: (buffer: Buffer, { charset }: import("./parser.js").ContentType) => import("./parser.js").Json;
|
11
11
|
}, {
|
12
12
|
name: A[number];
|
13
13
|
}> | Extract<{
|
14
14
|
readonly name: "urlencoded";
|
15
|
-
readonly test: (
|
16
|
-
readonly parse: (buffer: Buffer) => Partial<Record<string, string>>;
|
15
|
+
readonly test: (mime: string) => mime is "application/x-www-form-urlencoded";
|
16
|
+
readonly parse: (buffer: Buffer, { charset }: import("./parser.js").ContentType) => Partial<Record<string, string>>;
|
17
17
|
}, {
|
18
18
|
name: A[number];
|
19
19
|
}> | Extract<{
|
20
20
|
readonly name: "bytes";
|
21
|
-
readonly test: (
|
21
|
+
readonly test: (mime: string) => mime is "application/octet-stream";
|
22
22
|
readonly parse: (buffer: Buffer) => Buffer;
|
23
23
|
}, {
|
24
24
|
name: A[number];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/lib/http/stream.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/lib/http/stream.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAe,QAAQ,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EAEV,aAAa,EACb,YAAY,EAEb,MAAM,aAAa,CAAA;AAEpB,wBAAsB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ/D;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,QAAQ,EACb,QAAQ,GAAE,MAAmB,GAC5B,QAAQ,CAWV;AAED,wBAAsB,WAAW,CAC/B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,SAAS,UAAU,EAAE,EAEvD,GAAG,EAAE,QAAQ,EACb,WAAW,EAAE,CAAC,EACd,KAAK,CAAC,EAAE,CAAC,GACR,OAAO,CACR,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAC1E,CAAA;AACD,wBAAsB,WAAW,CAC/B,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,SAAS,UAAU,EAAE,EAEvD,GAAG,EAAE,QAAQ,EACb,WAAW,EAAE,OAAO,EACpB,KAAK,CAAC,EAAE,CAAC,GACR,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC,CAAC,CAAA"}
|
package/dist/lib/http/stream.js
CHANGED
@@ -35,12 +35,13 @@ async function parseStream(req, contentType = 'application/octet-stream', allow)
|
|
35
35
|
if (typeof contentType !== 'string') {
|
36
36
|
throw (0, http_errors_1.default)(400, 'Invalid content-type');
|
37
37
|
}
|
38
|
-
const
|
38
|
+
const type = (0, parser_js_1.parseContentType)(contentType);
|
39
|
+
const parser = parser_js_1.parsers.find((parser) => allow?.includes(parser.name) !== false && parser.test(type.mime));
|
39
40
|
if (!parser) {
|
40
41
|
throw (0, http_errors_1.default)(400, 'Unsupported content-type');
|
41
42
|
}
|
42
43
|
const buffer = await readStream(req);
|
43
|
-
return parser.parse(buffer);
|
44
|
+
return parser.parse(buffer, type);
|
44
45
|
}
|
45
46
|
exports.parseStream = parseStream;
|
46
47
|
//# sourceMappingURL=stream.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/lib/http/stream.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAmD;AACnD,yCAAuD;AAEvD,8DAAyC;AAEzC,
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/lib/http/stream.ts"],"names":[],"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QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CACnE,CAAA;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAA,qBAAe,EAAC,GAAG,EAAE,0BAA0B,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,CAAA;IACpC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AACnC,CAAC;AAtBD,kCAsBC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"build-metadata.d.ts","sourceRoot":"","sources":["../../src/metadata/build-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAMvE,MAAM,MAAM,cAAc,GAAG;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,qCAAqC,CAAC,EAAE,MAAM,EAAE,CAAA;IAChD,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC/B,CAAA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,cAAc,GAC9B,gCAAgC,
|
1
|
+
{"version":3,"file":"build-metadata.d.ts","sourceRoot":"","sources":["../../src/metadata/build-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAMvE,MAAM,MAAM,cAAc,GAAG;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,qCAAqC,CAAC,EAAE,MAAM,EAAE,CAAA;IAChD,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC/B,CAAA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,cAAc,GAC9B,gCAAgC,CAmIlC"}
|
@@ -100,25 +100,11 @@ function buildMetadata(issuer, keyset, customMetadata) {
|
|
100
100
|
token_endpoint_auth_methods_supported: [...client_js_1.Client.AUTH_METHODS_SUPPORTED],
|
101
101
|
token_endpoint_auth_signing_alg_values_supported: [...crypto_js_1.VERIFY_ALGOS],
|
102
102
|
revocation_endpoint: new URL('/oauth/revoke', issuer).href,
|
103
|
-
revocation_endpoint_auth_methods_supported: [
|
104
|
-
...client_js_1.Client.AUTH_METHODS_SUPPORTED,
|
105
|
-
],
|
106
|
-
revocation_endpoint_auth_signing_alg_values_supported: [...crypto_js_1.VERIFY_ALGOS],
|
107
103
|
introspection_endpoint: new URL('/oauth/introspect', issuer).href,
|
108
|
-
introspection_endpoint_auth_methods_supported: [
|
109
|
-
...client_js_1.Client.AUTH_METHODS_SUPPORTED,
|
110
|
-
],
|
111
|
-
introspection_endpoint_auth_signing_alg_values_supported: [...crypto_js_1.VERIFY_ALGOS],
|
112
104
|
userinfo_endpoint: new URL('/oauth/userinfo', issuer).href,
|
113
105
|
// end_session_endpoint: new URL('/oauth/logout', issuer).href,
|
114
106
|
// https://datatracker.ietf.org/doc/html/rfc9126#section-5
|
115
107
|
pushed_authorization_request_endpoint: new URL('/oauth/par', issuer).href,
|
116
|
-
pushed_authorization_request_endpoint_auth_methods_supported: [
|
117
|
-
...client_js_1.Client.AUTH_METHODS_SUPPORTED,
|
118
|
-
],
|
119
|
-
pushed_authorization_request_endpoint_auth_signing_alg_values_supported: [
|
120
|
-
...crypto_js_1.VERIFY_ALGOS,
|
121
|
-
],
|
122
108
|
require_pushed_authorization_requests: true,
|
123
109
|
// https://datatracker.ietf.org/doc/html/rfc9449#section-5.1
|
124
110
|
dpop_signing_alg_values_supported: [...crypto_js_1.VERIFY_ALGOS],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"build-metadata.js","sourceRoot":"","sources":["../../src/metadata/build-metadata.ts"],"names":[],"mappings":";;;AAGA,mDAA4C;AAC5C,iDAAwD;AACxD,qDAAoD;AASpD;;;GAGG;AACH,SAAgB,aAAa,CAC3B,MAAc,EACd,MAAc,EACd,cAA+B;IAE/B,OAAO;QACL,MAAM;QAEN,gBAAgB,EAAE;YAChB,gBAAgB;YAChB,QAAQ;YACR,OAAO;YACP,OAAO;YACP,SAAS;YAET,GAAG,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,CAAC;SAC5C;QACD,gBAAgB,EAAE;YAChB,4BAA4B;YAE5B,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,8BAA8B;YACrC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,WAAW;YAEX,YAAY;YAEZ,gBAAgB;YAChB,SAAS;YACT,SAAS;YACT,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE,gEAAgE;YAEzE,GAAG,CAAC,cAAc,EAAE,gBAAgB,IAAI,gCAAoB,CAAC;SAC9D;QACD,uBAAuB,EAAE;YACvB,EAAE;YACF,QAAQ,EAAE,6CAA6C;YACvD,+DAA+D;SAChE;QACD,wBAAwB,EAAE;YACxB,QAAQ;YACR,MAAM;YACN,OAAO;YAEP,SAAS;YACT,MAAM;YACN,qBAAqB;YACrB,eAAe;YACf,YAAY;YACZ,gBAAgB;YAChB,UAAU;SACX;QACD,wBAAwB,EAAE;YACxB,mFAAmF;YACnF,OAAO;YACP,UAAU;YACV,0FAA0F;YAC1F,WAAW;SACZ;QACD,qBAAqB,EAAE;YACrB,EAAE;YACF,oBAAoB;YACpB,eAAe;SAChB;QACD,gCAAgC,EAAE;YAChC,sGAAsG;YACtG,MAAM;YACN,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E,EAAE;QAE5B,0BAA0B,EAAE,IAAI;QAChC,2BAA2B,EAAE,IAAI;QACjC,+BAA+B,EAAE,IAAI;QACrC,gCAAgC,EAAE,IAAI;QAEtC,QAAQ,EAAE,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,IAAI;QAE7C,sBAAsB,EAAE,IAAI,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,IAAI;QAEhE,cAAc,EAAE,IAAI,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,IAAI;QACpD,qCAAqC,EAAE,CAAC,GAAG,kBAAM,CAAC,sBAAsB,CAAC;QACzE,gDAAgD,EAAE,CAAC,GAAG,wBAAY,CAAC;QAEnE,mBAAmB,EAAE,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,IAAI;QAE1D,sBAAsB,EAAE,IAAI,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,IAAI;QAEjE,iBAAiB,EAAE,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,IAAI;QAC1D,+DAA+D;QAE/D,0DAA0D;QAC1D,qCAAqC,EAAE,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,IAAI;QAEzE,qCAAqC,EAAE,IAAI;QAE3C,4DAA4D;QAC5D,iCAAiC,EAAE,CAAC,GAAG,wBAAY,CAAC;QAEpD,6DAA6D;QAC7D,qCAAqC,EACnC,cAAc,EAAE,qCAAqC;QAEvD,wFAAwF;QACxF,mBAAmB,EAAE,cAAc,EAAE,mBAAmB;QAExD,kIAAkI;QAClI,qCAAqC,EAAE,IAAI;KAC5C,CAAA;AACH,CAAC;AAvID,sCAuIC"}
|
package/dist/oauth-provider.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { SimpleStore } from '@atproto-labs/simple-store';
|
3
3
|
import { Jwks, Keyset, SignedJwt } from '@atproto/jwk';
|
4
|
-
import { AccessToken, OAuthAuthenticationRequestParameters, OAuthAuthorizationServerMetadata, OAuthClientIdentification, OAuthClientMetadata,
|
4
|
+
import { AccessToken, OAuthAuthenticationRequestParameters, OAuthAuthorizationServerMetadata, OAuthClientIdentification, OAuthClientMetadata, OAuthTokenResponse, OAuthTokenType } from '@atproto/oauth-types';
|
5
5
|
import { Redis, type RedisOptions } from 'ioredis';
|
6
6
|
import { AccountManager } from './account/account-manager.js';
|
7
7
|
import { AccountInfo, AccountStore, DeviceAccountInfo, SignInCredentials } from './account/account-store.js';
|
@@ -217,7 +217,7 @@ export declare class OAuthProvider extends OAuthVerifier {
|
|
217
217
|
})[];
|
218
218
|
};
|
219
219
|
protected loginRequired(client: Client, parameters: OAuthAuthenticationRequestParameters, info: DeviceAccountInfo): boolean;
|
220
|
-
protected authenticateClient(client: Client,
|
220
|
+
protected authenticateClient(client: Client, credentials: OAuthClientIdentification): Promise<ClientAuth>;
|
221
221
|
protected decodeJAR(client: Client, input: AuthorizationRequestJar): Promise<{
|
222
222
|
payload: OAuthAuthenticationRequestParameters;
|
223
223
|
} | {
|