@atproto/oauth-provider 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +45 -0
- package/dist/account/account-store.d.ts +2 -2
- package/dist/assets/app/bundle-manifest.json +3 -3
- package/dist/assets/app/main.css +1 -1
- package/dist/assets/app/main.js +3 -3
- package/dist/assets/app/main.js.map +1 -1
- package/dist/assets/assets-middleware.d.ts.map +1 -1
- package/dist/assets/assets-middleware.js +4 -2
- package/dist/assets/assets-middleware.js.map +1 -1
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +127 -118
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client-utils.d.ts +1 -2
- package/dist/client/client-utils.d.ts.map +1 -1
- package/dist/client/client-utils.js +3 -12
- package/dist/client/client-utils.js.map +1 -1
- package/dist/client/client.d.ts +8 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +70 -1
- package/dist/client/client.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/errors/access-denied-error.d.ts +4 -4
- package/dist/errors/access-denied-error.d.ts.map +1 -1
- package/dist/errors/access-denied-error.js +2 -2
- package/dist/errors/access-denied-error.js.map +1 -1
- package/dist/errors/account-selection-required-error.d.ts +2 -2
- package/dist/errors/account-selection-required-error.d.ts.map +1 -1
- package/dist/errors/account-selection-required-error.js.map +1 -1
- package/dist/errors/consent-required-error.d.ts +2 -2
- package/dist/errors/consent-required-error.d.ts.map +1 -1
- package/dist/errors/consent-required-error.js.map +1 -1
- package/dist/errors/invalid-authorization-details-error.d.ts +2 -2
- package/dist/errors/invalid-authorization-details-error.d.ts.map +1 -1
- package/dist/errors/invalid-authorization-details-error.js.map +1 -1
- package/dist/errors/invalid-client-id-error.d.ts +1 -1
- package/dist/errors/invalid-client-id-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-id-error.js +12 -6
- package/dist/errors/invalid-client-id-error.js.map +1 -1
- package/dist/errors/invalid-client-metadata-error.d.ts +1 -1
- package/dist/errors/invalid-client-metadata-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-metadata-error.js +11 -3
- package/dist/errors/invalid-client-metadata-error.js.map +1 -1
- package/dist/errors/invalid-parameters-error.d.ts +2 -2
- package/dist/errors/invalid-parameters-error.d.ts.map +1 -1
- package/dist/errors/invalid-parameters-error.js.map +1 -1
- package/dist/errors/invalid-scope-error.d.ts +9 -0
- package/dist/errors/invalid-scope-error.d.ts.map +1 -0
- package/dist/errors/invalid-scope-error.js +14 -0
- package/dist/errors/invalid-scope-error.js.map +1 -0
- package/dist/errors/login-required-error.d.ts +2 -2
- package/dist/errors/login-required-error.d.ts.map +1 -1
- package/dist/errors/login-required-error.js.map +1 -1
- package/dist/lib/html/html.d.ts +1 -1
- package/dist/lib/html/html.d.ts.map +1 -1
- package/dist/lib/html/html.js +14 -11
- package/dist/lib/html/html.js.map +1 -1
- package/dist/lib/http/parser.d.ts +9 -2
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/parser.js +15 -7
- package/dist/lib/http/parser.js.map +1 -1
- package/dist/lib/http/request.d.ts +0 -23
- package/dist/lib/http/request.d.ts.map +1 -1
- package/dist/lib/http/request.js +1 -11
- package/dist/lib/http/request.js.map +1 -1
- package/dist/lib/http/stream.d.ts +28 -6
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/http/stream.js +21 -32
- package/dist/lib/http/stream.js.map +1 -1
- package/dist/lib/util/authorization-header.d.ts.map +1 -1
- package/dist/lib/util/authorization-header.js +1 -1
- package/dist/lib/util/authorization-header.js.map +1 -1
- package/dist/lib/util/hostname.d.ts +3 -2
- package/dist/lib/util/hostname.d.ts.map +1 -1
- package/dist/lib/util/hostname.js +12 -8
- package/dist/lib/util/hostname.js.map +1 -1
- package/dist/metadata/build-metadata.d.ts.map +1 -1
- package/dist/metadata/build-metadata.js +2 -1
- package/dist/metadata/build-metadata.js.map +1 -1
- package/dist/oauth-errors.d.ts +1 -0
- package/dist/oauth-errors.d.ts.map +1 -1
- package/dist/oauth-errors.js +3 -1
- package/dist/oauth-errors.js.map +1 -1
- package/dist/oauth-hooks.d.ts +3 -3
- package/dist/oauth-hooks.d.ts.map +1 -1
- package/dist/oauth-provider.d.ts +20 -22
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +234 -176
- package/dist/oauth-provider.js.map +1 -1
- package/dist/oauth-verifier.d.ts +2 -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 +2 -2
- package/dist/output/build-authorize-data.d.ts.map +1 -1
- package/dist/output/send-authorize-redirect.d.ts +2 -4
- package/dist/output/send-authorize-redirect.d.ts.map +1 -1
- package/dist/output/send-authorize-redirect.js +5 -2
- package/dist/output/send-authorize-redirect.js.map +1 -1
- package/dist/request/request-data.d.ts +2 -2
- package/dist/request/request-data.d.ts.map +1 -1
- package/dist/request/request-info.d.ts +2 -2
- package/dist/request/request-info.d.ts.map +1 -1
- package/dist/request/request-manager.d.ts +4 -4
- package/dist/request/request-manager.d.ts.map +1 -1
- package/dist/request/request-manager.js +94 -60
- package/dist/request/request-manager.js.map +1 -1
- package/dist/signer/signed-token-payload.d.ts +122 -122
- package/dist/signer/signer.d.ts +41 -40
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +13 -15
- package/dist/signer/signer.js.map +1 -1
- package/dist/token/token-claims.d.ts +121 -121
- package/dist/token/token-data.d.ts +3 -3
- package/dist/token/token-data.d.ts.map +1 -1
- package/dist/token/token-manager.d.ts +4 -5
- package/dist/token/token-manager.d.ts.map +1 -1
- package/dist/token/token-manager.js +96 -72
- package/dist/token/token-manager.js.map +1 -1
- package/dist/token/verify-token-claims.d.ts +3 -3
- package/dist/token/verify-token-claims.d.ts.map +1 -1
- package/dist/token/verify-token-claims.js.map +1 -1
- package/package.json +5 -4
- package/src/assets/app/components/accept-form.tsx +6 -2
- package/src/assets/app/components/client-name.tsx +10 -11
- package/src/assets/app/components/sign-in-form.tsx +31 -2
- package/src/assets/assets-middleware.ts +4 -2
- package/src/client/client-manager.ts +163 -161
- package/src/client/client-utils.ts +7 -12
- package/src/client/client.ts +112 -3
- package/src/constants.ts +0 -2
- package/src/errors/access-denied-error.ts +10 -4
- package/src/errors/account-selection-required-error.ts +2 -2
- package/src/errors/consent-required-error.ts +2 -2
- package/src/errors/invalid-authorization-details-error.ts +2 -2
- package/src/errors/invalid-client-id-error.ts +15 -4
- package/src/errors/invalid-client-metadata-error.ts +15 -3
- package/src/errors/invalid-parameters-error.ts +2 -2
- package/src/errors/invalid-scope-error.ts +15 -0
- package/src/errors/login-required-error.ts +2 -2
- package/src/lib/html/html.ts +14 -12
- package/src/lib/http/parser.ts +21 -8
- package/src/lib/http/request.ts +1 -23
- package/src/lib/http/stream.ts +29 -60
- package/src/lib/util/authorization-header.ts +5 -2
- package/src/lib/util/hostname.ts +9 -5
- package/src/metadata/build-metadata.ts +3 -1
- package/src/oauth-errors.ts +1 -0
- package/src/oauth-hooks.ts +3 -3
- package/src/oauth-provider.ts +368 -269
- package/src/oauth-verifier.ts +2 -2
- package/src/output/build-authorize-data.ts +2 -2
- package/src/output/send-authorize-redirect.ts +7 -6
- package/src/request/request-data.ts +2 -2
- package/src/request/request-info.ts +2 -2
- package/src/request/request-manager.ts +129 -103
- package/src/signer/signer.ts +24 -25
- package/src/token/token-data.ts +3 -3
- package/src/token/token-manager.ts +141 -99
- package/src/token/verify-token-claims.ts +3 -3
- package/dist/request/types.d.ts +0 -328
- package/dist/request/types.d.ts.map +0 -1
- package/dist/request/types.js +0 -27
- package/dist/request/types.js.map +0 -1
- package/dist/token/types.d.ts +0 -250
- package/dist/token/types.d.ts.map +0 -1
- package/dist/token/types.js +0 -36
- package/dist/token/types.js.map +0 -1
- package/src/request/types.ts +0 -48
- package/src/token/types.ts +0 -86
@@ -1 +1 @@
|
|
1
|
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
|
3
|
-
import {
|
3
|
+
import { OAuthAccessToken, OAuthTokenType } from '@atproto/oauth-types';
|
4
4
|
import { Redis, type RedisOptions } from 'ioredis';
|
5
5
|
import { AccessTokenType } from './access-token/access-token-type.js';
|
6
6
|
import { DpopManager, DpopManagerOptions } from './dpop/dpop-manager.js';
|
@@ -56,7 +56,7 @@ export declare class OAuthVerifier {
|
|
56
56
|
nextDpopNonce(): string | undefined;
|
57
57
|
checkDpopProof(proof: unknown, htm: string, htu: string | URL, accessToken?: string): Promise<string | null>;
|
58
58
|
protected assertTokenTypeAllowed(tokenType: OAuthTokenType, accessTokenType: AccessTokenType): void;
|
59
|
-
protected authenticateToken(tokenType: OAuthTokenType, token:
|
59
|
+
protected authenticateToken(tokenType: OAuthTokenType, token: OAuthAccessToken, dpopJkt: string | null, verifyOptions?: VerifyTokenClaimsOptions): Promise<VerifyTokenClaimsResult>;
|
60
60
|
authenticateRequest(method: string, url: URL, headers: {
|
61
61
|
authorization?: string;
|
62
62
|
dpop?: unknown;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-verifier.d.ts","sourceRoot":"","sources":["../src/oauth-verifier.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAe,MAAM,cAAc,CAAA;AACvD,OAAO,EACL,
|
1
|
+
{"version":3,"file":"oauth-verifier.d.ts","sourceRoot":"","sources":["../src/oauth-verifier.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAe,MAAM,cAAc,CAAA;AACvD,OAAO,EACL,gBAAgB,EAChB,cAAc,EAEf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE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AAA;QAC1E,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CACvC,OAAO,CAAC,IAAI,EACZ,MAAM,EACN,GAAG,EACH,KAAK,CACN,CAAA;YAED,IAAI,SAAS,KAAK,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;gBACrC,MAAM,IAAI,mDAAqB,CAAC,qBAAqB,CAAC,CAAA;YACxD,CAAC;YAED,OAAO,MAAM,IAAI,CAAC,iBAAiB,CACjC,SAAS,EACT,KAAK,EACL,OAAO,EACP,aAAa,CACd,CAAA;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,2CAAiB;gBAAE,MAAM,GAAG,CAAC,sBAAsB,EAAE,CAAA;YACxE,IAAI,GAAG,YAAY,gDAAoB;gBAAE,MAAM,GAAG,CAAA;YAElD,MAAM,0CAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC;CACF;AA3ID,sCA2IC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAuthorizationRequestParameters, OAuthClientMetadata } from '@atproto/oauth-types';
|
2
2
|
import { DeviceAccountInfo } from '../account/account-store.js';
|
3
3
|
import { Account } from '../account/account.js';
|
4
4
|
import { Client } from '../client/client.js';
|
@@ -10,7 +10,7 @@ export type ScopeDetail = {
|
|
10
10
|
export type AuthorizationResultAuthorize = {
|
11
11
|
issuer: string;
|
12
12
|
client: Client;
|
13
|
-
parameters:
|
13
|
+
parameters: OAuthAuthorizationRequestParameters;
|
14
14
|
authorize: {
|
15
15
|
uri: RequestUri;
|
16
16
|
scopeDetails?: ScopeDetail[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"build-authorize-data.d.ts","sourceRoot":"","sources":["../../src/output/build-authorize-data.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
1
|
+
{"version":3,"file":"build-authorize-data.d.ts","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,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,yBAAyB,EAAE,OAAO,CAAA;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB,CAAA;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,4BAA4B,GACjC,aAAa,CAmBf"}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import {
|
2
|
+
import { OAuthAuthorizationRequestParameters, OAuthTokenType } from '@atproto/oauth-types';
|
3
3
|
import { ServerResponse } from 'node:http';
|
4
|
-
import { Client } from '../client/client.js';
|
5
4
|
import { Code } from '../request/code.js';
|
6
5
|
export type AuthorizationResponseParameters = {
|
7
6
|
code?: Code;
|
@@ -17,8 +16,7 @@ export type AuthorizationResponseParameters = {
|
|
17
16
|
};
|
18
17
|
export type AuthorizationResultRedirect = {
|
19
18
|
issuer: string;
|
20
|
-
|
21
|
-
parameters: OAuthAuthenticationRequestParameters;
|
19
|
+
parameters: OAuthAuthorizationRequestParameters;
|
22
20
|
redirect: AuthorizationResponseParameters;
|
23
21
|
};
|
24
22
|
export declare function sendAuthorizeRedirect(res: ServerResponse, result: AuthorizationResultRedirect): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"send-authorize-redirect.d.ts","sourceRoot":"","sources":["../../src/output/send-authorize-redirect.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,
|
1
|
+
{"version":3,"file":"send-authorize-redirect.d.ts","sourceRoot":"","sources":["../../src/output/send-authorize-redirect.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,mCAAmC,EACnC,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAI1C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAMzC,MAAM,MAAM,+BAA+B,GAAG;IAO5C,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,mCAAmC,CAAA;IAC/C,QAAQ,EAAE,+BAA+B,CAAA;CAC1C,CAAA;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
@@ -1,13 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.sendAuthorizeRedirect = void 0;
|
4
|
+
const invalid_request_error_js_1 = require("../errors/invalid-request-error.js");
|
4
5
|
const index_js_1 = require("../lib/html/index.js");
|
5
6
|
const send_web_page_js_1 = require("./send-web-page.js");
|
6
7
|
// https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-11#section-7.5.4
|
7
8
|
const REDIRECT_STATUS_CODE = 303;
|
8
9
|
async function sendAuthorizeRedirect(res, result) {
|
9
|
-
const { issuer, parameters, redirect
|
10
|
-
const uri = parameters.redirect_uri
|
10
|
+
const { issuer, parameters, redirect } = result;
|
11
|
+
const uri = parameters.redirect_uri;
|
12
|
+
if (!uri)
|
13
|
+
throw new invalid_request_error_js_1.InvalidRequestError('No redirect_uri');
|
11
14
|
const mode = parameters.response_mode || 'query'; // @TODO: default should depend on response_type
|
12
15
|
const entries = Object.entries({
|
13
16
|
iss: issuer, // rfc9207
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"send-authorize-redirect.js","sourceRoot":"","sources":["../../src/output/send-authorize-redirect.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"send-authorize-redirect.js","sourceRoot":"","sources":["../../src/output/send-authorize-redirect.ts"],"names":[],"mappings":";;;AAMA,iFAAwE;AACxE,mDAA+C;AAE/C,yDAAgD;AAEhD,+EAA+E;AAC/E,MAAM,oBAAoB,GAAG,GAAG,CAAA;AA6BzB,KAAK,UAAU,qBAAqB,CACzC,GAAmB,EACnB,MAAmC;IAEnC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAA;IAE/C,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAA;IACnC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,8CAAmB,CAAC,iBAAiB,CAAC,CAAA;IAE1D,MAAM,IAAI,GAAG,UAAU,CAAC,aAAa,IAAI,OAAO,CAAA,CAAC,gDAAgD;IAEjG,MAAM,OAAO,GAAuB,MAAM,CAAC,OAAO,CAAC;QACjD,GAAG,EAAE,MAAM,EAAE,UAAU;QACvB,KAAK,EAAE,UAAU,CAAC,KAAK;QAEvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,YAAY;QACzC,aAAa,EAAE,QAAQ,CAAC,aAAa,EAAE,0BAA0B;QAEjE,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,UAAU,EAAE,QAAQ,CAAC,UAAU;QAE/B,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;QAC7C,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAC,CAAC,MAA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AI,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAA;IAClC,GAAG,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAA;AACnE,CAAC;AAED,KAAK,UAAU,aAAa,CAC1B,GAAmB,EACnB,GAAW,EACX,OAAoC;IAEpC,4CAA4C;IAC5C,uGAAuG;IACvG,GAAG,CAAC,SAAS,CAAC,YAAY,EAAE,4CAA4C,CAAC,CAAA;IACzE,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;IAC1C,GAAG,CAAC,SAAS,CAAC,oBAAoB,EAAE,uCAAuC,CAAC,CAAA;IAE5E,OAAO,IAAA,8BAAW,EAAC,GAAG,EAAE;QACtB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QACzB,IAAI,EAAE,IAAA,eAAI,EAAA;oCACsB,GAAG;UAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;YAC9B,IAAA,eAAI,EAAA,8BAA8B,GAAG,YAAY,KAAK,MAAM;SAC7D,CAAC;;;KAGL;QACD,OAAO,EAAE,CAAC,IAAA,aAAE,EAAA,6BAA6B,CAAC;KAC3C,CAAC,CAAA;AACJ,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAuthorizationRequestParameters } from '@atproto/oauth-types';
|
2
2
|
import { ClientAuth } from '../client/client-auth.js';
|
3
3
|
import { ClientId } from '../client/client-id.js';
|
4
4
|
import { DeviceId } from '../device/device-id.js';
|
@@ -7,7 +7,7 @@ import { Code } from './code.js';
|
|
7
7
|
export type RequestData = {
|
8
8
|
clientId: ClientId;
|
9
9
|
clientAuth: ClientAuth;
|
10
|
-
parameters: Readonly<
|
10
|
+
parameters: Readonly<OAuthAuthorizationRequestParameters>;
|
11
11
|
expiresAt: Date;
|
12
12
|
deviceId: DeviceId | null;
|
13
13
|
sub: Sub | null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"request-data.d.ts","sourceRoot":"","sources":["../../src/request/request-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"request-data.d.ts","sourceRoot":"","sources":["../../src/request/request-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAA;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,QAAQ,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,QAAQ,CAAC,mCAAmC,CAAC,CAAA;IACzD,SAAS,EAAE,IAAI,CAAA;IACf,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;IACzB,GAAG,EAAE,GAAG,GAAG,IAAI,CAAA;IACf,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IAChD,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,uBAAuB,SAC5B,WAAW,kCAC4D,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAuthorizationRequestParameters } from '@atproto/oauth-types';
|
2
2
|
import { ClientId } from '../client/client-id.js';
|
3
3
|
import { ClientAuth } from '../client/client-auth.js';
|
4
4
|
import { RequestId } from './request-id.js';
|
@@ -6,7 +6,7 @@ import { RequestUri } from './request-uri.js';
|
|
6
6
|
export type RequestInfo = {
|
7
7
|
id: RequestId;
|
8
8
|
uri: RequestUri;
|
9
|
-
parameters: Readonly<
|
9
|
+
parameters: Readonly<OAuthAuthorizationRequestParameters>;
|
10
10
|
expiresAt: Date;
|
11
11
|
clientId: ClientId;
|
12
12
|
clientAuth: ClientAuth;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"request-info.d.ts","sourceRoot":"","sources":["../../src/request/request-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"request-info.d.ts","sourceRoot":"","sources":["../../src/request/request-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,SAAS,CAAA;IACb,GAAG,EAAE,UAAU,CAAA;IACf,UAAU,EAAE,QAAQ,CAAC,mCAAmC,CAAC,CAAA;IACzD,SAAS,EAAE,IAAI,CAAA;IACf,QAAQ,EAAE,QAAQ,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAuthorizationRequestParameters, OAuthAuthorizationServerMetadata } from '@atproto/oauth-types';
|
2
2
|
import { Account } from '../account/account.js';
|
3
3
|
import { ClientAuth } from '../client/client-auth.js';
|
4
4
|
import { ClientId } from '../client/client-id.js';
|
@@ -19,9 +19,9 @@ export declare class RequestManager {
|
|
19
19
|
protected readonly tokenMaxAge: number;
|
20
20
|
constructor(store: RequestStore, signer: Signer, metadata: OAuthAuthorizationServerMetadata, hooks: OAuthHooks, tokenMaxAge?: number);
|
21
21
|
protected createTokenExpiry(): Date;
|
22
|
-
createAuthorizationRequest(client: Client, clientAuth: ClientAuth, input: Readonly<
|
23
|
-
protected create(client: Client, clientAuth: ClientAuth, parameters: Readonly<
|
24
|
-
validate(client: Client, clientAuth: ClientAuth, parameters: Readonly<
|
22
|
+
createAuthorizationRequest(client: Client, clientAuth: ClientAuth, input: Readonly<OAuthAuthorizationRequestParameters>, deviceId: null | DeviceId, dpopJkt: null | string): Promise<RequestInfo>;
|
23
|
+
protected create(client: Client, clientAuth: ClientAuth, parameters: Readonly<OAuthAuthorizationRequestParameters>, deviceId?: null | DeviceId): Promise<RequestInfo>;
|
24
|
+
protected validate(client: Client, clientAuth: ClientAuth, parameters: Readonly<OAuthAuthorizationRequestParameters>, dpop_jkt: null | string): Promise<Readonly<OAuthAuthorizationRequestParameters>>;
|
25
25
|
get(uri: RequestUri, clientId: ClientId, deviceId: DeviceId): Promise<RequestInfo>;
|
26
26
|
setAuthorized(client: Client, uri: RequestUri, deviceId: DeviceId, account: Account): Promise<Code>;
|
27
27
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"request-manager.d.ts","sourceRoot":"","sources":["../../src/request/request-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,
|
1
|
+
{"version":3,"file":"request-manager.d.ts","sourceRoot":"","sources":["../../src/request/request-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mCAAmC,EACnC,gCAAgC,EACjC,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAM5C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAA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tB,UAAU,EAAE,QAAQ,CAAC,mCAAmC,CAAC,EACzD,QAAQ,EAAE,IAAI,GAAG,MAAM,GACtB,OAAO,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC;IAwNnD,GAAG,CACP,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,WAAW,CAAC;IA4DjB,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;OAGG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,qBAAqB,CAAC;IA2C3B,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7C"}
|
@@ -9,11 +9,11 @@ const invalid_authorization_details_error_js_1 = require("../errors/invalid-auth
|
|
9
9
|
const invalid_grant_error_js_1 = require("../errors/invalid-grant-error.js");
|
10
10
|
const invalid_parameters_error_js_1 = require("../errors/invalid-parameters-error.js");
|
11
11
|
const invalid_request_error_js_1 = require("../errors/invalid-request-error.js");
|
12
|
-
const redirect_uri_js_1 = require("../lib/util/redirect-uri.js");
|
13
12
|
const code_js_1 = require("./code.js");
|
14
13
|
const request_data_js_1 = require("./request-data.js");
|
15
14
|
const request_id_js_1 = require("./request-id.js");
|
16
15
|
const request_uri_js_1 = require("./request-uri.js");
|
16
|
+
const invalid_scope_error_js_1 = require("../errors/invalid-scope-error.js");
|
17
17
|
class RequestManager {
|
18
18
|
store;
|
19
19
|
signer;
|
@@ -49,99 +49,133 @@ class RequestManager {
|
|
49
49
|
const uri = (0, request_uri_js_1.encodeRequestUri)(id);
|
50
50
|
return { id, uri, expiresAt, parameters, clientId: client.id, clientAuth };
|
51
51
|
}
|
52
|
-
async validate(client, clientAuth, parameters,
|
52
|
+
async validate(client, clientAuth, parameters, dpop_jkt) {
|
53
|
+
// -------------------------------
|
54
|
+
// Validate unsupported parameters
|
55
|
+
// -------------------------------
|
53
56
|
for (const k of [
|
54
57
|
// Known unsupported OIDC parameters
|
55
58
|
'claims',
|
56
59
|
'id_token_hint',
|
57
60
|
'nonce', // note that OIDC "nonce" is redundant with PKCE
|
58
61
|
]) {
|
59
|
-
if (parameters[k]) {
|
62
|
+
if (parameters[k] !== undefined) {
|
60
63
|
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, `Unsupported "${k}" parameter`);
|
61
64
|
}
|
62
65
|
}
|
63
|
-
|
64
|
-
|
66
|
+
// -----------------------
|
67
|
+
// Validate against server
|
68
|
+
// -----------------------
|
69
|
+
if (!this.metadata.response_types_supported?.includes(parameters.response_type)) {
|
70
|
+
throw new access_denied_error_js_1.AccessDeniedError(parameters, `Unsupported response_type "${parameters.response_type}"`, 'unsupported_response_type');
|
65
71
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
// > the resource owner's instructions. If the issued access token scope is
|
70
|
-
// > different from the one requested by the client, the authorization
|
71
|
-
// > server MUST include the scope response parameter in the token response
|
72
|
-
// > (Section 3.2.3) to inform the client of the actual scope granted.
|
73
|
-
const cScopes = client.metadata.scope?.split(' ').filter(Boolean);
|
74
|
-
const sScopes = this.metadata.scopes_supported;
|
75
|
-
const scopes = new Set(parameters.scope?.split(' ').filter(Boolean) || cScopes);
|
76
|
-
if (scopes.has('openid')) {
|
77
|
-
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'OpenID Connect is not supported');
|
72
|
+
if (parameters.response_type === 'code' &&
|
73
|
+
!this.metadata.grant_types_supported?.includes('authorization_code')) {
|
74
|
+
throw new access_denied_error_js_1.AccessDeniedError(parameters, `Unsupported grant_type "authorization_code"`, 'unsupported_grant_type');
|
78
75
|
}
|
79
|
-
if (
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
// Currently, the implementation requires all the scopes to be statically
|
88
|
-
// defined in the server metadata. In the future, we might add support
|
89
|
-
// for dynamic scopes.
|
90
|
-
if (!sScopes?.includes(scope)) {
|
91
|
-
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, `Scope "${scope}" is not supported by this server`);
|
76
|
+
if (parameters.scope) {
|
77
|
+
for (const scope of parameters.scope.split(' ')) {
|
78
|
+
// Currently, the implementation requires all the scopes to be statically
|
79
|
+
// defined in the server metadata. In the future, we might add support
|
80
|
+
// for dynamic scopes.
|
81
|
+
if (!this.metadata.scopes_supported?.includes(scope)) {
|
82
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, `Scope "${scope}" is not supported by this server`);
|
83
|
+
}
|
92
84
|
}
|
93
85
|
}
|
94
|
-
parameters = { ...parameters, scope: [...scopes].join(' ') || undefined };
|
95
86
|
if (parameters.authorization_details) {
|
96
|
-
const clientAuthDetailsTypes = client.metadata.authorization_details_types;
|
97
|
-
if (!clientAuthDetailsTypes) {
|
98
|
-
throw new invalid_authorization_details_error_js_1.InvalidAuthorizationDetailsError(parameters, 'Client Metadata does not declare any "authorization_details"');
|
99
|
-
}
|
100
87
|
for (const detail of parameters.authorization_details) {
|
101
88
|
if (!this.metadata.authorization_details_types_supported?.includes(detail.type)) {
|
102
89
|
throw new invalid_authorization_details_error_js_1.InvalidAuthorizationDetailsError(parameters, `Unsupported "authorization_details" type "${detail.type}"`);
|
103
90
|
}
|
104
|
-
if (!clientAuthDetailsTypes?.includes(detail.type)) {
|
105
|
-
throw new invalid_authorization_details_error_js_1.InvalidAuthorizationDetailsError(parameters, `Client Metadata does not declare any "authorization_details" of type "${detail.type}"`);
|
106
|
-
}
|
107
91
|
}
|
108
92
|
}
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
93
|
+
// -----------------------
|
94
|
+
// Validate against client
|
95
|
+
// -----------------------
|
96
|
+
parameters = client.validateRequest(parameters);
|
97
|
+
// -------------------
|
98
|
+
// Validate parameters
|
99
|
+
// -------------------
|
100
|
+
if (!parameters.redirect_uri) {
|
101
|
+
// Should already be ensured by client.validateRequest(). Adding here for
|
102
|
+
// clarity & extra safety.
|
103
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'Missing "redirect_uri"');
|
113
104
|
}
|
105
|
+
// https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#section-1.4.1
|
106
|
+
// > The authorization server MAY fully or partially ignore the scope
|
107
|
+
// > requested by the client, based on the authorization server policy or
|
108
|
+
// > the resource owner's instructions. If the issued access token scope is
|
109
|
+
// > different from the one requested by the client, the authorization
|
110
|
+
// > server MUST include the scope response parameter in the token response
|
111
|
+
// > (Section 3.2.3) to inform the client of the actual scope granted.
|
112
|
+
// Let's make sure the scopes are unique (to reduce the token & storage size)
|
113
|
+
const scopes = new Set(parameters.scope?.split(' '));
|
114
|
+
parameters = { ...parameters, scope: [...scopes].join(' ') || undefined };
|
114
115
|
// https://datatracker.ietf.org/doc/html/rfc9449#section-10
|
115
116
|
if (!parameters.dpop_jkt) {
|
116
|
-
if (
|
117
|
-
parameters = { ...parameters, dpop_jkt
|
117
|
+
if (dpop_jkt)
|
118
|
+
parameters = { ...parameters, dpop_jkt };
|
118
119
|
}
|
119
|
-
else if (parameters.dpop_jkt !==
|
120
|
-
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, '
|
120
|
+
else if (parameters.dpop_jkt !== dpop_jkt) {
|
121
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, '"dpop_jkt" parameters does not match the DPoP proof');
|
121
122
|
}
|
122
123
|
if (clientAuth.method === oauth_types_1.CLIENT_ASSERTION_TYPE_JWT_BEARER) {
|
123
124
|
if (parameters.dpop_jkt && clientAuth.jkt === parameters.dpop_jkt) {
|
124
125
|
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'The DPoP proof must be signed with a different key than the client assertion');
|
125
126
|
}
|
126
127
|
}
|
127
|
-
if (
|
128
|
-
|
128
|
+
if (parameters.code_challenge) {
|
129
|
+
switch (parameters.code_challenge_method) {
|
130
|
+
case undefined:
|
131
|
+
// https://datatracker.ietf.org/doc/html/rfc7636#section-4.3
|
132
|
+
parameters = { ...parameters, code_challenge_method: 'plain' };
|
133
|
+
// falls through
|
134
|
+
case 'plain':
|
135
|
+
case 'S256':
|
136
|
+
break;
|
137
|
+
default: {
|
138
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, `Unsupported code_challenge_method "${parameters.code_challenge_method}"`);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
else {
|
143
|
+
if (parameters.code_challenge_method) {
|
144
|
+
// https://datatracker.ietf.org/doc/html/rfc7636#section-4.4.1
|
145
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'code_challenge is required when code_challenge_method is provided');
|
146
|
+
}
|
147
|
+
// https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-11#section-4.1.2.1
|
148
|
+
//
|
149
|
+
// > An AS MUST reject requests without a code_challenge from public
|
150
|
+
// > clients, and MUST reject such requests from other clients unless
|
151
|
+
// > there is reasonable assurance that the client mitigates
|
152
|
+
// > authorization code injection in other ways. See Section 7.5.1 for
|
153
|
+
// > details.
|
154
|
+
//
|
155
|
+
// > [...] In the specific deployment and the specific request, there is
|
156
|
+
// > reasonable assurance by the authorization server that the client
|
157
|
+
// > implements the OpenID Connect nonce mechanism properly.
|
158
|
+
//
|
159
|
+
// atproto does not implement the OpenID Connect nonce mechanism, so we
|
160
|
+
// require the use of PKCE for all clients.
|
161
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'Use of PKCE is required');
|
129
162
|
}
|
130
|
-
//
|
131
|
-
//
|
132
|
-
|
133
|
-
|
163
|
+
// -----------------
|
164
|
+
// atproto extension
|
165
|
+
// -----------------
|
166
|
+
if (parameters.response_type !== 'code') {
|
167
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'atproto only supports the "code" response_type');
|
168
|
+
}
|
169
|
+
if (!scopes.has('atproto')) {
|
170
|
+
throw new invalid_scope_error_js_1.InvalidScopeError(parameters, 'The "atproto" scope is required');
|
134
171
|
}
|
135
|
-
if (
|
136
|
-
|
137
|
-
(parameters.code_challenge_method ?? 'plain') === 'plain') {
|
138
|
-
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'code_challenge_method=plain requires client authentication');
|
172
|
+
else if (scopes.has('openid')) {
|
173
|
+
throw new invalid_scope_error_js_1.InvalidScopeError(parameters, 'OpenID Connect is not compatible with atproto');
|
139
174
|
}
|
140
|
-
|
141
|
-
|
142
|
-
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'code_challenge_method requires code_challenge');
|
175
|
+
if (parameters.code_challenge_method !== 'S256') {
|
176
|
+
throw new invalid_parameters_error_js_1.InvalidParametersError(parameters, 'atproto requires use of "S256" code_challenge_method');
|
143
177
|
}
|
144
|
-
//
|
178
|
+
// atproto extension: if the client is not trusted, and not authenticated,
|
145
179
|
// force users to consent to authorization requests. We do this to avoid
|
146
180
|
// unauthenticated clients from being able to silently re-authenticate
|
147
181
|
// users.
|