@atproto/oauth-provider 0.6.6 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/access-token/access-token-mode.d.ts +5 -0
- package/dist/access-token/access-token-mode.d.ts.map +1 -0
- package/dist/access-token/access-token-mode.js +9 -0
- package/dist/access-token/access-token-mode.js.map +1 -0
- package/dist/account/account-manager.d.ts +13 -7
- package/dist/account/account-manager.d.ts.map +1 -1
- package/dist/account/account-manager.js +69 -52
- package/dist/account/account-manager.js.map +1 -1
- package/dist/account/account-store.d.ts +88 -77
- package/dist/account/account-store.d.ts.map +1 -1
- package/dist/account/account-store.js +24 -73
- package/dist/account/account-store.js.map +1 -1
- package/dist/account/sign-in-data.d.ts +4 -13
- package/dist/account/sign-in-data.d.ts.map +1 -1
- package/dist/account/sign-in-data.js +9 -9
- package/dist/account/sign-in-data.js.map +1 -1
- package/dist/account/sign-up-input.d.ts +4 -5
- package/dist/account/sign-up-input.d.ts.map +1 -1
- package/dist/account/sign-up-input.js +13 -3
- package/dist/account/sign-up-input.js.map +1 -1
- package/dist/client/client-manager.d.ts +4 -1
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +13 -1
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client-store.d.ts +1 -1
- package/dist/client/client-store.d.ts.map +1 -1
- package/dist/constants.d.ts +5 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -2
- package/dist/constants.js.map +1 -1
- package/dist/customization/branding.d.ts +54 -0
- package/dist/customization/branding.d.ts.map +1 -0
- package/dist/customization/branding.js +13 -0
- package/dist/customization/branding.js.map +1 -0
- package/dist/customization/build-customization-css.d.ts +3 -0
- package/dist/customization/build-customization-css.d.ts.map +1 -0
- package/dist/customization/build-customization-css.js +27 -0
- package/dist/customization/build-customization-css.js.map +1 -0
- package/dist/customization/build-customization-data.d.ts +4 -0
- package/dist/customization/build-customization-data.d.ts.map +1 -0
- package/dist/customization/build-customization-data.js +18 -0
- package/dist/customization/build-customization-data.js.map +1 -0
- package/dist/customization/colors.d.ts +7 -0
- package/dist/customization/colors.d.ts.map +1 -0
- package/dist/customization/colors.js +27 -0
- package/dist/customization/colors.js.map +1 -0
- package/dist/customization/customization.d.ts +129 -0
- package/dist/customization/customization.d.ts.map +1 -0
- package/dist/customization/customization.js +26 -0
- package/dist/customization/customization.js.map +1 -0
- package/dist/customization/links.d.ts +26 -0
- package/dist/customization/links.d.ts.map +1 -0
- package/dist/customization/links.js +12 -0
- package/dist/customization/links.js.map +1 -0
- package/dist/device/device-id.d.ts +1 -0
- package/dist/device/device-id.d.ts.map +1 -1
- package/dist/device/device-id.js +4 -0
- package/dist/device/device-id.js.map +1 -1
- package/dist/device/device-manager.d.ts +6 -36
- package/dist/device/device-manager.d.ts.map +1 -1
- package/dist/device/device-manager.js +49 -43
- package/dist/device/device-manager.js.map +1 -1
- package/dist/device/device-store.d.ts +1 -0
- package/dist/device/device-store.d.ts.map +1 -1
- package/dist/device/device-store.js.map +1 -1
- package/dist/dpop/dpop-manager.d.ts +3 -3
- package/dist/dpop/dpop-nonce.d.ts +3 -3
- package/dist/dpop/dpop-nonce.d.ts.map +1 -1
- package/dist/errors/access-denied-error.d.ts +4 -3
- package/dist/errors/access-denied-error.d.ts.map +1 -1
- package/dist/errors/access-denied-error.js +5 -6
- package/dist/errors/access-denied-error.js.map +1 -1
- package/dist/{output/build-error-payload.d.ts → errors/error-parser.d.ts} +1 -1
- package/dist/errors/error-parser.d.ts.map +1 -0
- package/dist/{output/build-error-payload.js → errors/error-parser.js} +2 -2
- package/dist/errors/error-parser.js.map +1 -0
- package/dist/errors/invalid-grant-error.d.ts +1 -0
- package/dist/errors/invalid-grant-error.d.ts.map +1 -1
- package/dist/errors/invalid-grant-error.js +5 -0
- package/dist/errors/invalid-grant-error.js.map +1 -1
- package/dist/errors/login-required-error.d.ts +1 -0
- package/dist/errors/login-required-error.d.ts.map +1 -1
- package/dist/errors/login-required-error.js +5 -0
- package/dist/errors/login-required-error.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/html/build-document.d.ts +2 -2
- package/dist/lib/html/build-document.d.ts.map +1 -1
- package/dist/lib/html/build-document.js +4 -0
- package/dist/lib/html/build-document.js.map +1 -1
- package/dist/lib/html/hydration-data.d.ts +4 -0
- package/dist/lib/html/hydration-data.d.ts.map +1 -0
- package/dist/{output/backend-data.js → lib/html/hydration-data.js} +8 -8
- package/dist/lib/html/hydration-data.js.map +1 -0
- package/dist/lib/html/tags.d.ts +1 -1
- package/dist/lib/html/tags.d.ts.map +1 -1
- package/dist/lib/html/tags.js +1 -1
- package/dist/lib/html/tags.js.map +1 -1
- package/dist/lib/http/accept.d.ts +2 -2
- package/dist/lib/http/accept.d.ts.map +1 -1
- package/dist/lib/http/accept.js +1 -1
- package/dist/lib/http/accept.js.map +1 -1
- package/dist/lib/http/context.d.ts +2 -4
- package/dist/lib/http/context.d.ts.map +1 -1
- package/dist/lib/http/context.js +29 -4
- package/dist/lib/http/context.js.map +1 -1
- package/dist/lib/http/headers.d.ts +3 -0
- package/dist/lib/http/headers.d.ts.map +1 -0
- package/dist/lib/http/headers.js +14 -0
- package/dist/lib/http/headers.js.map +1 -0
- package/dist/lib/http/index.d.ts +1 -0
- package/dist/lib/http/index.d.ts.map +1 -1
- package/dist/lib/http/index.js +1 -0
- package/dist/lib/http/index.js.map +1 -1
- package/dist/lib/http/middleware.d.ts +1 -1
- package/dist/lib/http/middleware.d.ts.map +1 -1
- package/dist/lib/http/middleware.js +8 -24
- package/dist/lib/http/middleware.js.map +1 -1
- package/dist/lib/http/parser.d.ts +3 -3
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/request.d.ts +13 -9
- package/dist/lib/http/request.d.ts.map +1 -1
- package/dist/lib/http/request.js +27 -49
- package/dist/lib/http/request.js.map +1 -1
- package/dist/lib/http/response.d.ts +6 -2
- package/dist/lib/http/response.d.ts.map +1 -1
- package/dist/lib/http/response.js +31 -11
- package/dist/lib/http/response.js.map +1 -1
- package/dist/lib/http/route.d.ts +3 -3
- package/dist/lib/http/route.d.ts.map +1 -1
- package/dist/lib/http/route.js +1 -1
- package/dist/lib/http/route.js.map +1 -1
- package/dist/lib/http/router.d.ts +12 -11
- package/dist/lib/http/router.d.ts.map +1 -1
- package/dist/lib/http/router.js +26 -34
- package/dist/lib/http/router.js.map +1 -1
- package/dist/lib/http/security-headers.js +1 -1
- package/dist/lib/http/security-headers.js.map +1 -1
- package/dist/lib/http/stream.d.ts +3 -3
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/http/types.d.ts +1 -1
- package/dist/lib/http/types.d.ts.map +1 -1
- package/dist/lib/send-web-page.d.ts +8 -0
- package/dist/lib/send-web-page.d.ts.map +1 -0
- package/dist/{output → lib}/send-web-page.js +9 -7
- package/dist/lib/send-web-page.js.map +1 -0
- package/dist/lib/util/authorization-header.d.ts.map +1 -1
- package/dist/lib/util/color.d.ts +32 -0
- package/dist/lib/util/color.d.ts.map +1 -0
- package/dist/lib/util/color.js +116 -0
- package/dist/lib/util/color.js.map +1 -0
- package/dist/lib/util/crypto.d.ts +1 -0
- package/dist/lib/util/crypto.d.ts.map +1 -1
- package/dist/lib/util/crypto.js +8 -3
- package/dist/lib/util/crypto.js.map +1 -1
- package/dist/lib/util/function.d.ts +1 -0
- package/dist/lib/util/function.d.ts.map +1 -1
- package/dist/lib/util/function.js +12 -0
- package/dist/lib/util/function.js.map +1 -1
- package/dist/lib/util/locale.d.ts +20 -0
- package/dist/lib/util/locale.d.ts.map +1 -0
- package/dist/lib/util/locale.js +14 -0
- package/dist/lib/util/locale.js.map +1 -0
- package/dist/lib/util/time.d.ts +1 -1
- package/dist/lib/util/time.d.ts.map +1 -1
- package/dist/lib/util/time.js +1 -1
- package/dist/lib/util/time.js.map +1 -1
- package/dist/lib/util/type.d.ts +22 -0
- package/dist/lib/util/type.d.ts.map +1 -1
- package/dist/lib/util/type.js.map +1 -1
- package/dist/lib/util/ui8.d.ts +4 -0
- package/dist/lib/util/ui8.d.ts.map +1 -0
- package/dist/lib/util/ui8.js +17 -0
- package/dist/lib/util/ui8.js.map +1 -0
- package/dist/lib/util/zod-error.d.ts +2 -0
- package/dist/lib/util/zod-error.d.ts.map +1 -0
- package/dist/lib/util/zod-error.js +16 -0
- package/dist/lib/util/zod-error.js.map +1 -0
- package/dist/oauth-errors.d.ts +22 -22
- package/dist/oauth-errors.d.ts.map +1 -1
- package/dist/oauth-errors.js +37 -45
- package/dist/oauth-errors.js.map +1 -1
- package/dist/oauth-hooks.d.ts +11 -23
- package/dist/oauth-hooks.d.ts.map +1 -1
- package/dist/oauth-hooks.js.map +1 -1
- package/dist/oauth-middleware.d.ts +12 -0
- package/dist/oauth-middleware.d.ts.map +1 -0
- package/dist/oauth-middleware.js +32 -0
- package/dist/oauth-middleware.js.map +1 -0
- package/dist/oauth-provider.d.ts +109 -113
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +124 -542
- package/dist/oauth-provider.js.map +1 -1
- package/dist/oauth-verifier.d.ts +7 -26
- package/dist/oauth-verifier.d.ts.map +1 -1
- package/dist/oauth-verifier.js +6 -16
- package/dist/oauth-verifier.js.map +1 -1
- package/dist/request/code.d.ts.map +1 -1
- package/dist/request/request-data.d.ts +2 -4
- package/dist/request/request-data.d.ts.map +1 -1
- package/dist/request/request-data.js.map +1 -1
- package/dist/request/request-manager.d.ts +4 -2
- package/dist/request/request-manager.d.ts.map +1 -1
- package/dist/request/request-manager.js +9 -8
- package/dist/request/request-manager.js.map +1 -1
- package/dist/request/request-store.d.ts +6 -0
- package/dist/request/request-store.d.ts.map +1 -1
- package/dist/request/request-store.js +3 -1
- package/dist/request/request-store.js.map +1 -1
- package/dist/result/authorization-redirect-parameters.d.ts +18 -0
- package/dist/result/authorization-redirect-parameters.d.ts.map +1 -0
- package/dist/result/authorization-redirect-parameters.js +3 -0
- package/dist/result/authorization-redirect-parameters.js.map +1 -0
- package/dist/result/authorization-result-authorize-page.d.ts +13 -0
- package/dist/result/authorization-result-authorize-page.d.ts.map +1 -0
- package/dist/result/authorization-result-authorize-page.js +3 -0
- package/dist/result/authorization-result-authorize-page.js.map +1 -0
- package/dist/result/authorization-result-redirect.d.ts +8 -0
- package/dist/result/authorization-result-redirect.d.ts.map +1 -0
- package/dist/result/authorization-result-redirect.js +3 -0
- package/dist/result/authorization-result-redirect.js.map +1 -0
- package/dist/router/assets/assets-manifest.d.ts +10 -0
- package/dist/router/assets/assets-manifest.d.ts.map +1 -0
- package/dist/router/assets/assets-manifest.js +77 -0
- package/dist/router/assets/assets-manifest.js.map +1 -0
- package/dist/router/assets/assets.d.ts +16 -0
- package/dist/router/assets/assets.d.ts.map +1 -0
- package/dist/router/assets/assets.js +43 -0
- package/dist/router/assets/assets.js.map +1 -0
- package/dist/router/assets/csrf.d.ts +4 -0
- package/dist/router/assets/csrf.d.ts.map +1 -0
- package/dist/router/assets/csrf.js +51 -0
- package/dist/router/assets/csrf.js.map +1 -0
- package/dist/router/assets/send-account-page.d.ts +7 -0
- package/dist/router/assets/send-account-page.d.ts.map +1 -0
- package/dist/router/assets/send-account-page.js +34 -0
- package/dist/router/assets/send-account-page.js.map +1 -0
- package/dist/router/assets/send-authorization-page.d.ts +5 -0
- package/dist/router/assets/send-authorization-page.d.ts.map +1 -0
- package/dist/router/assets/send-authorization-page.js +49 -0
- package/dist/router/assets/send-authorization-page.js.map +1 -0
- package/dist/router/assets/send-error-page.d.ts +4 -0
- package/dist/router/assets/send-error-page.d.ts.map +1 -0
- package/dist/router/assets/send-error-page.js +34 -0
- package/dist/router/assets/send-error-page.js.map +1 -0
- package/dist/router/create-account-page-middleware.d.ts +6 -0
- package/dist/router/create-account-page-middleware.d.ts.map +1 -0
- package/dist/router/create-account-page-middleware.js +39 -0
- package/dist/router/create-account-page-middleware.js.map +1 -0
- package/dist/router/create-api-middleware.d.ts +8 -0
- package/dist/router/create-api-middleware.d.ts.map +1 -0
- package/dist/router/create-api-middleware.js +501 -0
- package/dist/router/create-api-middleware.js.map +1 -0
- package/dist/router/create-authorization-page-middleware.d.ts +6 -0
- package/dist/router/create-authorization-page-middleware.d.ts.map +1 -0
- package/dist/router/create-authorization-page-middleware.js +104 -0
- package/dist/router/create-authorization-page-middleware.js.map +1 -0
- package/dist/router/create-oauth-middleware.d.ts +6 -0
- package/dist/router/create-oauth-middleware.d.ts.map +1 -0
- package/dist/router/create-oauth-middleware.js +142 -0
- package/dist/router/create-oauth-middleware.js.map +1 -0
- package/dist/router/error-handler.d.ts +3 -0
- package/dist/router/error-handler.d.ts.map +1 -0
- package/dist/{account/account.js → router/error-handler.js} +1 -1
- package/dist/router/error-handler.js.map +1 -0
- package/dist/router/middleware-options.d.ts +6 -0
- package/dist/router/middleware-options.d.ts.map +1 -0
- package/dist/router/middleware-options.js +3 -0
- package/dist/router/middleware-options.js.map +1 -0
- package/dist/router/send-redirect.d.ts +16 -0
- package/dist/router/send-redirect.d.ts.map +1 -0
- package/dist/{output/send-authorize-redirect.js → router/send-redirect.js} +40 -24
- package/dist/router/send-redirect.js.map +1 -0
- package/dist/{token/token-claims.d.ts → signer/api-token-payload.d.ts} +237 -232
- package/dist/signer/api-token-payload.d.ts.map +1 -0
- package/dist/signer/api-token-payload.js +17 -0
- package/dist/signer/api-token-payload.js.map +1 -0
- package/dist/signer/signed-token-payload.d.ts +164 -159
- package/dist/signer/signed-token-payload.d.ts.map +1 -1
- package/dist/signer/signed-token-payload.js +10 -16
- package/dist/signer/signed-token-payload.js.map +1 -1
- package/dist/signer/signer.d.ts +42 -11246
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +30 -15
- package/dist/signer/signer.js.map +1 -1
- package/dist/token/refresh-token.d.ts.map +1 -1
- package/dist/token/token-data.d.ts +1 -1
- package/dist/token/token-data.d.ts.map +1 -1
- package/dist/token/token-id.d.ts.map +1 -1
- package/dist/token/token-manager.d.ts +28 -26
- package/dist/token/token-manager.d.ts.map +1 -1
- package/dist/token/token-manager.js +138 -196
- package/dist/token/token-manager.js.map +1 -1
- package/dist/token/token-store.d.ts +4 -4
- package/dist/token/token-store.d.ts.map +1 -1
- package/dist/token/token-store.js +1 -0
- package/dist/token/token-store.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 +1 -1
- package/dist/token/verify-token-claims.js.map +1 -1
- package/dist/types/email-otp.d.ts +3 -0
- package/dist/types/email-otp.d.ts.map +1 -0
- package/dist/types/email-otp.js +6 -0
- package/dist/types/email-otp.js.map +1 -0
- package/dist/types/email.d.ts +3 -0
- package/dist/types/email.d.ts.map +1 -0
- package/dist/types/email.js +29 -0
- package/dist/types/email.js.map +1 -0
- package/dist/types/handle.d.ts +3 -0
- package/dist/types/handle.d.ts.map +1 -0
- package/dist/types/handle.js +22 -0
- package/dist/types/handle.js.map +1 -0
- package/dist/types/invite-code.d.ts +4 -0
- package/dist/types/invite-code.d.ts.map +1 -0
- package/dist/types/invite-code.js +6 -0
- package/dist/types/invite-code.js.map +1 -0
- package/dist/types/password.d.ts +4 -0
- package/dist/types/password.d.ts.map +1 -0
- package/dist/types/password.js +7 -0
- package/dist/types/password.js.map +1 -0
- package/package.json +11 -14
- package/src/access-token/access-token-mode.ts +4 -0
- package/src/account/account-manager.ts +105 -75
- package/src/account/account-store.ts +118 -114
- package/src/account/sign-in-data.ts +10 -10
- package/src/account/sign-up-input.ts +13 -4
- package/src/client/client-manager.ts +34 -2
- package/src/client/client-store.ts +1 -1
- package/src/constants.ts +6 -1
- package/src/customization/branding.ts +12 -0
- package/src/customization/build-customization-css.ts +30 -0
- package/src/customization/build-customization-data.ts +22 -0
- package/src/customization/colors.ts +30 -0
- package/src/customization/customization.ts +25 -0
- package/src/customization/links.ts +10 -0
- package/src/device/device-id.ts +5 -0
- package/src/device/device-manager.ts +76 -66
- package/src/device/device-store.ts +2 -0
- package/src/errors/access-denied-error.ts +24 -17
- package/src/{output/build-error-payload.ts → errors/error-parser.ts} +1 -1
- package/src/errors/invalid-grant-error.ts +5 -0
- package/src/errors/login-required-error.ts +10 -0
- package/src/index.ts +1 -0
- package/src/lib/html/build-document.ts +6 -4
- package/src/{output/backend-data.ts → lib/html/hydration-data.ts} +7 -5
- package/src/lib/html/tags.ts +2 -2
- package/src/lib/http/accept.ts +3 -3
- package/src/lib/http/context.ts +41 -10
- package/src/lib/http/headers.ts +15 -0
- package/src/lib/http/index.ts +1 -0
- package/src/lib/http/middleware.ts +8 -23
- package/src/lib/http/request.ts +40 -75
- package/src/lib/http/response.ts +39 -15
- package/src/lib/http/route.ts +8 -5
- package/src/lib/http/router.ts +40 -46
- package/src/lib/http/security-headers.ts +1 -1
- package/src/lib/http/types.ts +1 -6
- package/src/{output → lib}/send-web-page.ts +10 -9
- package/src/lib/util/color.ts +132 -0
- package/src/lib/util/crypto.ts +9 -4
- package/src/lib/util/function.ts +14 -0
- package/src/lib/util/locale.ts +18 -0
- package/src/lib/util/time.ts +3 -4
- package/src/lib/util/type.ts +24 -0
- package/src/lib/util/ui8.ts +14 -0
- package/src/lib/util/zod-error.ts +14 -0
- package/src/oauth-errors.ts +22 -22
- package/src/oauth-hooks.ts +11 -24
- package/src/oauth-middleware.ts +53 -0
- package/src/oauth-provider.ts +290 -1061
- package/src/oauth-verifier.ts +9 -55
- package/src/request/request-data.ts +5 -4
- package/src/request/request-manager.ts +11 -11
- package/src/request/request-store.ts +7 -0
- package/src/result/authorization-redirect-parameters.ts +24 -0
- package/src/result/authorization-result-authorize-page.ts +14 -0
- package/src/result/authorization-result-redirect.ts +8 -0
- package/src/router/assets/assets-manifest.ts +115 -0
- package/src/router/assets/assets.ts +54 -0
- package/src/router/assets/csrf.ts +63 -0
- package/src/router/assets/send-account-page.ts +43 -0
- package/src/router/assets/send-authorization-page.ts +62 -0
- package/src/router/assets/send-error-page.ts +42 -0
- package/src/router/create-account-page-middleware.ts +69 -0
- package/src/router/create-api-middleware.ts +814 -0
- package/src/router/create-authorization-page-middleware.ts +173 -0
- package/src/router/create-oauth-middleware.ts +247 -0
- package/src/router/error-handler.ts +6 -0
- package/src/router/middleware-options.ts +9 -0
- package/src/router/send-redirect.ts +142 -0
- package/src/signer/api-token-payload.ts +18 -0
- package/src/signer/signed-token-payload.ts +18 -28
- package/src/signer/signer.ts +49 -34
- package/src/token/token-data.ts +1 -1
- package/src/token/token-manager.ts +190 -239
- package/src/token/token-store.ts +6 -4
- package/src/token/verify-token-claims.ts +4 -4
- package/src/types/email-otp.ts +3 -0
- package/src/types/email.ts +26 -0
- package/src/types/handle.ts +18 -0
- package/src/types/invite-code.ts +4 -0
- package/src/types/password.ts +4 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +1 -1
- package/dist/access-token/access-token-type.d.ts +0 -6
- package/dist/access-token/access-token-type.d.ts.map +0 -1
- package/dist/access-token/access-token-type.js +0 -10
- package/dist/access-token/access-token-type.js.map +0 -1
- package/dist/account/account.d.ts +0 -2
- package/dist/account/account.d.ts.map +0 -1
- package/dist/account/account.js.map +0 -1
- package/dist/assets/assets-middleware.d.ts +0 -5
- package/dist/assets/assets-middleware.d.ts.map +0 -1
- package/dist/assets/assets-middleware.js +0 -41
- package/dist/assets/assets-middleware.js.map +0 -1
- package/dist/lib/locale.d.ts +0 -15
- package/dist/lib/locale.d.ts.map +0 -1
- package/dist/lib/locale.js +0 -17
- package/dist/lib/locale.js.map +0 -1
- package/dist/output/backend-data.d.ts +0 -4
- package/dist/output/backend-data.d.ts.map +0 -1
- package/dist/output/backend-data.js.map +0 -1
- package/dist/output/build-authorize-data.d.ts +0 -29
- package/dist/output/build-authorize-data.d.ts.map +0 -1
- package/dist/output/build-authorize-data.js +0 -21
- package/dist/output/build-authorize-data.js.map +0 -1
- package/dist/output/build-customization-data.d.ts +0 -234
- package/dist/output/build-customization-data.d.ts.map +0 -1
- package/dist/output/build-customization-data.js +0 -174
- package/dist/output/build-customization-data.js.map +0 -1
- package/dist/output/build-error-data.d.ts +0 -3
- package/dist/output/build-error-data.d.ts.map +0 -1
- package/dist/output/build-error-data.js +0 -10
- package/dist/output/build-error-data.js.map +0 -1
- package/dist/output/build-error-payload.d.ts.map +0 -1
- package/dist/output/build-error-payload.js.map +0 -1
- package/dist/output/output-manager.d.ts +0 -28
- package/dist/output/output-manager.d.ts.map +0 -1
- package/dist/output/output-manager.js +0 -134
- package/dist/output/output-manager.js.map +0 -1
- package/dist/output/send-authorize-redirect.d.ts +0 -25
- package/dist/output/send-authorize-redirect.d.ts.map +0 -1
- package/dist/output/send-authorize-redirect.js.map +0 -1
- package/dist/output/send-web-page.d.ts +0 -8
- package/dist/output/send-web-page.d.ts.map +0 -1
- package/dist/output/send-web-page.js.map +0 -1
- package/dist/token/token-claims.d.ts.map +0 -1
- package/dist/token/token-claims.js +0 -27
- package/dist/token/token-claims.js.map +0 -1
- package/src/access-token/access-token-type.ts +0 -5
- package/src/account/account.ts +0 -1
- package/src/assets/assets-middleware.ts +0 -44
- package/src/lib/locale.ts +0 -21
- package/src/output/build-authorize-data.ts +0 -53
- package/src/output/build-customization-data.ts +0 -217
- package/src/output/build-error-data.ts +0 -8
- package/src/output/output-manager.ts +0 -188
- package/src/output/send-authorize-redirect.ts +0 -137
- package/src/token/token-claims.ts +0 -30
- package/tsconfig.backend.tsbuildinfo +0 -1
- /package/{tsconfig.backend.json → tsconfig.build.json} +0 -0
package/dist/oauth-provider.d.ts
CHANGED
@@ -1,56 +1,68 @@
|
|
1
|
-
import type { IncomingMessage, ServerResponse } from 'node:http';
|
2
1
|
import type { Redis, RedisOptions } from 'ioredis';
|
3
2
|
import { Jwks, Keyset } from '@atproto/jwk';
|
4
|
-
import {
|
3
|
+
import type { Account } from '@atproto/oauth-provider-api';
|
4
|
+
import { OAuthAccessToken, OAuthAuthorizationCodeGrantTokenRequest, OAuthAuthorizationRequestJar, OAuthAuthorizationRequestPar, OAuthAuthorizationRequestParameters, OAuthAuthorizationRequestQuery, OAuthAuthorizationServerMetadata, OAuthClientCredentials, OAuthClientCredentialsNone, OAuthClientMetadata, OAuthParResponse, OAuthRefreshTokenGrantTokenRequest, OAuthTokenIdentification, OAuthTokenRequest, OAuthTokenResponse, OAuthTokenType } from '@atproto/oauth-types';
|
5
5
|
import { SimpleStore } from '@atproto-labs/simple-store';
|
6
|
+
import { AccessTokenMode } from './access-token/access-token-mode.js';
|
6
7
|
import { AccountManager } from './account/account-manager.js';
|
7
|
-
import { AccountStore,
|
8
|
-
import { Account } from './account/account.js';
|
8
|
+
import { AccountStore, AuthorizedClientData, DeviceAccount } from './account/account-store.js';
|
9
9
|
import { ClientAuth } from './client/client-auth.js';
|
10
|
+
import { ClientId } from './client/client-id.js';
|
10
11
|
import { ClientManager, LoopbackMetadataGetter } from './client/client-manager.js';
|
11
12
|
import { ClientStore } from './client/client-store.js';
|
12
13
|
import { Client } from './client/client.js';
|
14
|
+
import { Branding, BrandingInput } from './customization/branding.js';
|
15
|
+
import { Customization, CustomizationInput } from './customization/customization.js';
|
13
16
|
import { DeviceId } from './device/device-id.js';
|
14
17
|
import { DeviceManager, DeviceManagerOptions } from './device/device-manager.js';
|
15
18
|
import { DeviceStore } from './device/device-store.js';
|
16
19
|
import { HcaptchaConfig } from './lib/hcaptcha.js';
|
17
|
-
import { Handler, Router } from './lib/http/index.js';
|
18
20
|
import { RequestMetadata } from './lib/http/request.js';
|
19
|
-
import {
|
21
|
+
import { LocalizedString, MultiLangString } from './lib/util/locale.js';
|
20
22
|
import { CustomMetadata } from './metadata/build-metadata.js';
|
21
|
-
import { OAuthHooks
|
23
|
+
import { OAuthHooks } from './oauth-hooks.js';
|
22
24
|
import { OAuthVerifier, OAuthVerifierOptions } from './oauth-verifier.js';
|
23
|
-
import { AuthorizationResultAuthorize } from './output/build-authorize-data.js';
|
24
|
-
import { Branding, BrandingInput, Customization, CustomizationInput } from './output/build-customization-data.js';
|
25
|
-
import { OutputManager } from './output/output-manager.js';
|
26
|
-
import { AuthorizationResultRedirect } from './output/send-authorize-redirect.js';
|
27
25
|
import { ReplayStore } from './replay/replay-store.js';
|
28
26
|
import { RequestManager } from './request/request-manager.js';
|
29
27
|
import { RequestStore } from './request/request-store.js';
|
30
|
-
import {
|
28
|
+
import { AuthorizationRedirectParameters } from './result/authorization-redirect-parameters.js';
|
29
|
+
import { AuthorizationResultAuthorizePage } from './result/authorization-result-authorize-page.js';
|
30
|
+
import { AuthorizationResultRedirect } from './result/authorization-result-redirect.js';
|
31
|
+
import { ErrorHandler } from './router/error-handler.js';
|
31
32
|
import { TokenManager } from './token/token-manager.js';
|
32
33
|
import { TokenStore } from './token/token-store.js';
|
33
|
-
import { VerifyTokenClaimsOptions } from './token/verify-token-claims.js';
|
34
|
-
export {
|
35
|
-
type
|
36
|
-
|
37
|
-
deviceId: DeviceId;
|
38
|
-
deviceMetadata: RequestMetadata;
|
39
|
-
};
|
40
|
-
export type ErrorHandler<Req extends IncomingMessage = IncomingMessage, Res extends ServerResponse = ServerResponse> = (req: Req, res: Res, err: unknown, message: string) => void;
|
41
|
-
export type RouterOptions<Req extends IncomingMessage = IncomingMessage, Res extends ServerResponse = ServerResponse> = {
|
42
|
-
onError?: ErrorHandler<Req, Res>;
|
43
|
-
};
|
44
|
-
export type OAuthProviderOptions = Override<OAuthVerifierOptions & OAuthHooks & DeviceManagerOptions & CustomizationInput, {
|
34
|
+
import { VerifyTokenClaimsOptions, VerifyTokenClaimsResult } from './token/verify-token-claims.js';
|
35
|
+
export { AccessTokenMode, Keyset };
|
36
|
+
export type { AuthorizationRedirectParameters, AuthorizationResultAuthorizePage as AuthorizationResultAuthorize, AuthorizationResultRedirect, Branding, BrandingInput, CustomMetadata, Customization, CustomizationInput, ErrorHandler, HcaptchaConfig, LocalizedString, MultiLangString, OAuthAuthorizationServerMetadata, };
|
37
|
+
type OAuthProviderConfig = {
|
45
38
|
/**
|
46
39
|
* Maximum age a device/account session can be before requiring
|
47
40
|
* re-authentication.
|
48
41
|
*/
|
49
42
|
authenticationMaxAge?: number;
|
43
|
+
/**
|
44
|
+
* Maximum age an ephemeral session (one where "remember me" was not
|
45
|
+
* checked) can be before requiring re-authentication.
|
46
|
+
*/
|
50
47
|
/**
|
51
48
|
* Maximum age access & id tokens can be before requiring a refresh.
|
52
49
|
*/
|
53
50
|
tokenMaxAge?: number;
|
51
|
+
/**
|
52
|
+
* If set to {@link AccessTokenMode.stateless}, the generated access tokens
|
53
|
+
* will contain all the necessary information to validate the token without
|
54
|
+
* needing to query the database. This is useful for cases where the Resource
|
55
|
+
* Server is on a different host/server than the Authorization Server.
|
56
|
+
*
|
57
|
+
* When set to {@link AccessTokenMode.light}, the access tokens will contain
|
58
|
+
* only the necessary information to validate the token, but the token id
|
59
|
+
* will need to be queried from the database to retrieve the full token
|
60
|
+
* information (scope, audience, etc.)
|
61
|
+
*
|
62
|
+
* @see {@link AccessTokenMode}
|
63
|
+
* @default {AccessTokenMode.stateless}
|
64
|
+
*/
|
65
|
+
accessTokenMode?: AccessTokenMode;
|
54
66
|
/**
|
55
67
|
* Additional metadata to be included in the discovery document.
|
56
68
|
*/
|
@@ -105,117 +117,123 @@ export type OAuthProviderOptions = Override<OAuthVerifierOptions & OAuthHooks &
|
|
105
117
|
* @default is as specified by ATPROTO
|
106
118
|
*/
|
107
119
|
loopbackMetadata?: null | false | LoopbackMetadataGetter;
|
108
|
-
}
|
120
|
+
};
|
121
|
+
export type OAuthProviderOptions = OAuthProviderConfig & OAuthVerifierOptions & OAuthHooks & DeviceManagerOptions & CustomizationInput;
|
109
122
|
export declare class OAuthProvider extends OAuthVerifier {
|
123
|
+
protected readonly accessTokenMode: AccessTokenMode;
|
110
124
|
readonly metadata: OAuthAuthorizationServerMetadata;
|
125
|
+
readonly customization: Customization;
|
111
126
|
readonly authenticationMaxAge: number;
|
112
127
|
readonly accountManager: AccountManager;
|
113
128
|
readonly deviceManager: DeviceManager;
|
114
129
|
readonly clientManager: ClientManager;
|
115
130
|
readonly requestManager: RequestManager;
|
116
131
|
readonly tokenManager: TokenManager;
|
117
|
-
|
118
|
-
constructor({ metadata, authenticationMaxAge, tokenMaxAge, safeFetch, redis, store, // compound store implementation
|
132
|
+
constructor({ authenticationMaxAge, tokenMaxAge, accessTokenMode, metadata, safeFetch, redis, store, // compound store implementation
|
119
133
|
accountStore, deviceStore, tokenStore, clientStore, replayStore, requestStore, clientJwksCache, clientMetadataCache, loopbackMetadata, ...rest }: OAuthProviderOptions);
|
120
134
|
get jwks(): {
|
121
135
|
readonly keys: readonly ({
|
122
136
|
readonly kty: "RSA";
|
123
137
|
readonly n: string;
|
124
138
|
readonly e: string;
|
125
|
-
readonly alg?: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512" | undefined;
|
126
|
-
readonly kid?: string | undefined;
|
127
|
-
readonly ext?: boolean | undefined;
|
128
|
-
readonly use?: "sig" | "enc" | undefined;
|
139
|
+
readonly alg?: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512" | undefined | undefined;
|
140
|
+
readonly kid?: string | undefined | undefined;
|
141
|
+
readonly ext?: boolean | undefined | undefined;
|
142
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
129
143
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
130
144
|
readonly x5c?: readonly string[] | undefined;
|
131
|
-
readonly x5t?: string | undefined;
|
132
|
-
readonly 'x5t#S256'?: string | undefined;
|
133
|
-
readonly x5u?: string | undefined;
|
134
|
-
readonly d?: string | undefined;
|
135
|
-
readonly p?: string | undefined;
|
136
|
-
readonly q?: string | undefined;
|
137
|
-
readonly dp?: string | undefined;
|
138
|
-
readonly dq?: string | undefined;
|
139
|
-
readonly qi?: string | undefined;
|
145
|
+
readonly x5t?: string | undefined | undefined;
|
146
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
147
|
+
readonly x5u?: string | undefined | undefined;
|
148
|
+
readonly d?: string | undefined | undefined;
|
149
|
+
readonly p?: string | undefined | undefined;
|
150
|
+
readonly q?: string | undefined | undefined;
|
151
|
+
readonly dp?: string | undefined | undefined;
|
152
|
+
readonly dq?: string | undefined | undefined;
|
153
|
+
readonly qi?: string | undefined | undefined;
|
140
154
|
readonly oth?: readonly [{
|
141
|
-
readonly d?: string | undefined;
|
142
|
-
readonly r?: string | undefined;
|
143
|
-
readonly t?: string | undefined;
|
155
|
+
readonly d?: string | undefined | undefined;
|
156
|
+
readonly r?: string | undefined | undefined;
|
157
|
+
readonly t?: string | undefined | undefined;
|
144
158
|
}, ...{
|
145
|
-
readonly d?: string | undefined;
|
146
|
-
readonly r?: string | undefined;
|
147
|
-
readonly t?: string | undefined;
|
159
|
+
readonly d?: string | undefined | undefined;
|
160
|
+
readonly r?: string | undefined | undefined;
|
161
|
+
readonly t?: string | undefined | undefined;
|
148
162
|
}[]] | undefined;
|
149
163
|
} | {
|
150
164
|
readonly kty: "EC";
|
151
165
|
readonly crv: "P-256" | "P-384" | "P-521";
|
152
166
|
readonly x: string;
|
153
167
|
readonly y: string;
|
154
|
-
readonly alg?: "ES256" | "ES384" | "ES512" | undefined;
|
155
|
-
readonly kid?: string | undefined;
|
156
|
-
readonly ext?: boolean | undefined;
|
157
|
-
readonly use?: "sig" | "enc" | undefined;
|
168
|
+
readonly alg?: "ES256" | "ES384" | "ES512" | undefined | undefined;
|
169
|
+
readonly kid?: string | undefined | undefined;
|
170
|
+
readonly ext?: boolean | undefined | undefined;
|
171
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
158
172
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
159
173
|
readonly x5c?: readonly string[] | undefined;
|
160
|
-
readonly x5t?: string | undefined;
|
161
|
-
readonly 'x5t#S256'?: string | undefined;
|
162
|
-
readonly x5u?: string | undefined;
|
163
|
-
readonly d?: string | undefined;
|
174
|
+
readonly x5t?: string | undefined | undefined;
|
175
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
176
|
+
readonly x5u?: string | undefined | undefined;
|
177
|
+
readonly d?: string | undefined | undefined;
|
164
178
|
} | {
|
165
179
|
readonly kty: "EC";
|
166
180
|
readonly crv: "secp256k1";
|
167
181
|
readonly x: string;
|
168
182
|
readonly y: string;
|
169
|
-
readonly alg?: "ES256K" | undefined;
|
170
|
-
readonly kid?: string | undefined;
|
171
|
-
readonly ext?: boolean | undefined;
|
172
|
-
readonly use?: "sig" | "enc" | undefined;
|
183
|
+
readonly alg?: "ES256K" | undefined | undefined;
|
184
|
+
readonly kid?: string | undefined | undefined;
|
185
|
+
readonly ext?: boolean | undefined | undefined;
|
186
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
173
187
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
174
188
|
readonly x5c?: readonly string[] | undefined;
|
175
|
-
readonly x5t?: string | undefined;
|
176
|
-
readonly 'x5t#S256'?: string | undefined;
|
177
|
-
readonly x5u?: string | undefined;
|
178
|
-
readonly d?: string | undefined;
|
189
|
+
readonly x5t?: string | undefined | undefined;
|
190
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
191
|
+
readonly x5u?: string | undefined | undefined;
|
192
|
+
readonly d?: string | undefined | undefined;
|
179
193
|
} | {
|
180
194
|
readonly kty: "OKP";
|
181
195
|
readonly crv: "Ed25519" | "Ed448";
|
182
196
|
readonly x: string;
|
183
|
-
readonly alg?: "EdDSA" | undefined;
|
184
|
-
readonly kid?: string | undefined;
|
185
|
-
readonly ext?: boolean | undefined;
|
186
|
-
readonly use?: "sig" | "enc" | undefined;
|
197
|
+
readonly alg?: "EdDSA" | undefined | undefined;
|
198
|
+
readonly kid?: string | undefined | undefined;
|
199
|
+
readonly ext?: boolean | undefined | undefined;
|
200
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
187
201
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
188
202
|
readonly x5c?: readonly string[] | undefined;
|
189
|
-
readonly x5t?: string | undefined;
|
190
|
-
readonly 'x5t#S256'?: string | undefined;
|
191
|
-
readonly x5u?: string | undefined;
|
192
|
-
readonly d?: string | undefined;
|
203
|
+
readonly x5t?: string | undefined | undefined;
|
204
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
205
|
+
readonly x5u?: string | undefined | undefined;
|
206
|
+
readonly d?: string | undefined | undefined;
|
193
207
|
} | {
|
194
208
|
readonly kty: "oct";
|
195
209
|
readonly k: string;
|
196
|
-
readonly alg?: "HS256" | "HS384" | "HS512" | undefined;
|
197
|
-
readonly kid?: string | undefined;
|
198
|
-
readonly ext?: boolean | undefined;
|
199
|
-
readonly use?: "sig" | "enc" | undefined;
|
210
|
+
readonly alg?: "HS256" | "HS384" | "HS512" | undefined | undefined;
|
211
|
+
readonly kid?: string | undefined | undefined;
|
212
|
+
readonly ext?: boolean | undefined | undefined;
|
213
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
200
214
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
201
215
|
readonly x5c?: readonly string[] | undefined;
|
202
|
-
readonly x5t?: string | undefined;
|
203
|
-
readonly 'x5t#S256'?: string | undefined;
|
204
|
-
readonly x5u?: string | undefined;
|
216
|
+
readonly x5t?: string | undefined | undefined;
|
217
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
218
|
+
readonly x5u?: string | undefined | undefined;
|
205
219
|
} | {
|
206
220
|
readonly kty: string;
|
207
|
-
readonly alg?: string | undefined;
|
208
|
-
readonly kid?: string | undefined;
|
209
|
-
readonly ext?: boolean | undefined;
|
210
|
-
readonly use?: "sig" | "enc" | undefined;
|
221
|
+
readonly alg?: string | undefined | undefined;
|
222
|
+
readonly kid?: string | undefined | undefined;
|
223
|
+
readonly ext?: boolean | undefined | undefined;
|
224
|
+
readonly use?: "sig" | "enc" | undefined | undefined;
|
211
225
|
readonly key_ops?: readonly ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
212
226
|
readonly x5c?: readonly string[] | undefined;
|
213
|
-
readonly x5t?: string | undefined;
|
214
|
-
readonly 'x5t#S256'?: string | undefined;
|
215
|
-
readonly x5u?: string | undefined;
|
227
|
+
readonly x5t?: string | undefined | undefined;
|
228
|
+
readonly 'x5t#S256'?: string | undefined | undefined;
|
229
|
+
readonly x5u?: string | undefined | undefined;
|
216
230
|
})[];
|
217
231
|
};
|
218
|
-
|
232
|
+
/**
|
233
|
+
* @returns true if the user's consent is required for the requested scopes
|
234
|
+
*/
|
235
|
+
checkConsentRequired(parameters: OAuthAuthorizationRequestParameters, clientData?: AuthorizedClientData): boolean;
|
236
|
+
checkLoginRequired(deviceAccount: DeviceAccount): boolean;
|
219
237
|
protected authenticateClient(credentials: OAuthClientCredentials): Promise<[Client, ClientAuth]>;
|
220
238
|
protected decodeJAR(client: Client, input: OAuthAuthorizationRequestJar): Promise<{
|
221
239
|
payload: OAuthAuthorizationRequestParameters;
|
@@ -230,48 +248,26 @@ export declare class OAuthProvider extends OAuthVerifier {
|
|
230
248
|
/**
|
231
249
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc9126}
|
232
250
|
*/
|
233
|
-
|
251
|
+
pushedAuthorizationRequest(credentials: OAuthClientCredentials, authorizationRequest: OAuthAuthorizationRequestPar, dpopJkt: null | string): Promise<OAuthParResponse>;
|
234
252
|
private processAuthorizationRequest;
|
235
|
-
private deleteRequest;
|
236
253
|
/**
|
237
254
|
* @see {@link https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-11#section-4.1.1}
|
238
255
|
*/
|
239
|
-
|
240
|
-
protected getSessions(
|
256
|
+
authorize(clientCredentials: OAuthClientCredentialsNone, query: OAuthAuthorizationRequestQuery, deviceId: DeviceId, deviceMetadata: RequestMetadata): Promise<AuthorizationResultRedirect | AuthorizationResultAuthorizePage>;
|
257
|
+
protected getSessions(clientId: ClientId, deviceId: DeviceId, parameters: OAuthAuthorizationRequestParameters): Promise<{
|
241
258
|
account: Account;
|
242
|
-
info: DeviceAccountInfo;
|
243
259
|
selected: boolean;
|
244
260
|
loginRequired: boolean;
|
245
261
|
consentRequired: boolean;
|
246
262
|
matchesHint: boolean;
|
247
263
|
}[]>;
|
248
|
-
|
249
|
-
account: Account;
|
250
|
-
consentRequired: boolean;
|
251
|
-
}>;
|
252
|
-
protected signIn({ requestUri, deviceId, deviceMetadata }: ApiContext, data: SignInData): Promise<{
|
253
|
-
account: Account;
|
254
|
-
consentRequired: boolean;
|
255
|
-
}>;
|
256
|
-
protected acceptRequest({ requestUri, deviceId, deviceMetadata }: ApiContext, sub: string): Promise<AuthorizationResultRedirect>;
|
257
|
-
protected rejectRequest({ requestUri, deviceId, }: ApiContext): Promise<AuthorizationResultRedirect>;
|
258
|
-
protected token(clientCredentials: OAuthClientCredentials, clientMetadata: RequestMetadata, request: OAuthTokenRequest, dpopJkt: null | string): Promise<OAuthTokenResponse>;
|
264
|
+
token(clientCredentials: OAuthClientCredentials, clientMetadata: RequestMetadata, request: OAuthTokenRequest, dpopJkt: null | string): Promise<OAuthTokenResponse>;
|
259
265
|
protected codeGrant(client: Client, clientAuth: ClientAuth, clientMetadata: RequestMetadata, input: OAuthAuthorizationCodeGrantTokenRequest, dpopJkt: null | string): Promise<OAuthTokenResponse>;
|
260
266
|
refreshTokenGrant(client: Client, clientAuth: ClientAuth, clientMetadata: RequestMetadata, input: OAuthRefreshTokenGrantTokenRequest, dpopJkt: null | string): Promise<OAuthTokenResponse>;
|
261
267
|
/**
|
262
268
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc7009#section-2.1 rfc7009}
|
263
269
|
*/
|
264
|
-
|
265
|
-
|
266
|
-
* @see {@link https://datatracker.ietf.org/doc/html/rfc7662#section-2.1 rfc7662}
|
267
|
-
*/
|
268
|
-
protected introspect(credentials: OAuthClientCredentials, { token }: OAuthTokenIdentification): Promise<OAuthIntrospectionResponse>;
|
269
|
-
protected authenticateToken(tokenType: OAuthTokenType, token: OAuthAccessToken, dpopJkt: string | null, verifyOptions?: VerifyTokenClaimsOptions): Promise<import("./token/verify-token-claims.js").VerifyTokenClaimsResult>;
|
270
|
-
/**
|
271
|
-
* @returns An http request handler that can be used with node's http server
|
272
|
-
* or as a middleware with express / connect.
|
273
|
-
*/
|
274
|
-
httpHandler<T = void, Req extends IncomingMessage = IncomingMessage, Res extends ServerResponse = ServerResponse>(options?: RouterOptions<Req, Res>): Handler<T, Req, Res>;
|
275
|
-
buildRouter<T = void, Req extends IncomingMessage = IncomingMessage, Res extends ServerResponse = ServerResponse>(options?: RouterOptions<Req, Res>): Router<T, Req, Res>;
|
270
|
+
revoke(credentials: OAuthClientCredentials, { token }: OAuthTokenIdentification): Promise<void>;
|
271
|
+
protected verifyToken(tokenType: OAuthTokenType, token: OAuthAccessToken, dpopJkt: string | null, verifyOptions?: VerifyTokenClaimsOptions): Promise<VerifyTokenClaimsResult>;
|
276
272
|
}
|
277
273
|
//# sourceMappingURL=oauth-provider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-provider.d.ts","sourceRoot":"","sources":["../src/oauth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"oauth-provider.d.ts","sourceRoot":"","sources":["../src/oauth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,K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