@atproto/pds 0.5.15 → 0.5.17
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/account-manager/account-manager.d.ts +13 -13
- package/dist/account-manager/account-manager.d.ts.map +1 -1
- package/dist/account-manager/account-manager.js +1 -1
- package/dist/account-manager/account-manager.js.map +1 -1
- package/dist/account-manager/db/index.d.ts +1 -1
- package/dist/account-manager/db/index.d.ts.map +1 -1
- package/dist/account-manager/db/index.js.map +1 -1
- package/dist/account-manager/db/migrations/001-init.d.ts +1 -1
- package/dist/account-manager/db/migrations/001-init.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/001-init.js.map +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.d.ts +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/002-account-deactivation.js.map +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/003-privileged-app-passwords.js.map +1 -1
- package/dist/account-manager/db/migrations/004-oauth.d.ts +1 -1
- package/dist/account-manager/db/migrations/004-oauth.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/004-oauth.js.map +1 -1
- package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts +3 -3
- package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/005-oauth-account-management.js.map +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/006-oauth-permission-sets.js.map +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts.map +1 -1
- package/dist/account-manager/db/migrations/007-lexicon-failures-index.js.map +1 -1
- package/dist/account-manager/db/schema/account-device.d.ts +2 -2
- package/dist/account-manager/db/schema/account-device.d.ts.map +1 -1
- package/dist/account-manager/db/schema/account-device.js.map +1 -1
- package/dist/account-manager/db/schema/account.d.ts +2 -2
- package/dist/account-manager/db/schema/account.d.ts.map +1 -1
- package/dist/account-manager/db/schema/account.js.map +1 -1
- package/dist/account-manager/db/schema/actor.d.ts +2 -2
- package/dist/account-manager/db/schema/actor.d.ts.map +1 -1
- package/dist/account-manager/db/schema/actor.js.map +1 -1
- package/dist/account-manager/db/schema/app-password.d.ts +1 -1
- package/dist/account-manager/db/schema/app-password.d.ts.map +1 -1
- package/dist/account-manager/db/schema/app-password.js.map +1 -1
- package/dist/account-manager/db/schema/authorization-request.d.ts +4 -4
- package/dist/account-manager/db/schema/authorization-request.d.ts.map +1 -1
- package/dist/account-manager/db/schema/authorization-request.js.map +1 -1
- package/dist/account-manager/db/schema/authorized-client.d.ts +4 -4
- package/dist/account-manager/db/schema/authorized-client.d.ts.map +1 -1
- package/dist/account-manager/db/schema/authorized-client.js.map +1 -1
- package/dist/account-manager/db/schema/device.d.ts +3 -3
- package/dist/account-manager/db/schema/device.d.ts.map +1 -1
- package/dist/account-manager/db/schema/device.js.map +1 -1
- package/dist/account-manager/db/schema/email-token.d.ts +1 -1
- package/dist/account-manager/db/schema/email-token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/email-token.js.map +1 -1
- package/dist/account-manager/db/schema/index.d.ts +14 -14
- package/dist/account-manager/db/schema/index.d.ts.map +1 -1
- package/dist/account-manager/db/schema/index.js.map +1 -1
- package/dist/account-manager/db/schema/invite-code.d.ts +1 -1
- package/dist/account-manager/db/schema/invite-code.d.ts.map +1 -1
- package/dist/account-manager/db/schema/invite-code.js.map +1 -1
- package/dist/account-manager/db/schema/lexicon.d.ts +2 -2
- package/dist/account-manager/db/schema/lexicon.d.ts.map +1 -1
- package/dist/account-manager/db/schema/lexicon.js.map +1 -1
- package/dist/account-manager/db/schema/repo-root.d.ts +1 -1
- package/dist/account-manager/db/schema/repo-root.d.ts.map +1 -1
- package/dist/account-manager/db/schema/repo-root.js.map +1 -1
- package/dist/account-manager/db/schema/token.d.ts +4 -4
- package/dist/account-manager/db/schema/token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/token.js.map +1 -1
- package/dist/account-manager/db/schema/used-refresh-token.d.ts +2 -2
- package/dist/account-manager/db/schema/used-refresh-token.d.ts.map +1 -1
- package/dist/account-manager/db/schema/used-refresh-token.js.map +1 -1
- package/dist/account-manager/helpers/account-device.d.ts +2 -2
- package/dist/account-manager/helpers/account-device.d.ts.map +1 -1
- package/dist/account-manager/helpers/account-device.js.map +1 -1
- package/dist/account-manager/helpers/account.d.ts +3 -3
- package/dist/account-manager/helpers/account.d.ts.map +1 -1
- package/dist/account-manager/helpers/account.js.map +1 -1
- package/dist/account-manager/helpers/auth.d.ts +3 -3
- package/dist/account-manager/helpers/auth.d.ts.map +1 -1
- package/dist/account-manager/helpers/auth.js.map +1 -1
- package/dist/account-manager/helpers/authorization-request.d.ts +5 -5
- package/dist/account-manager/helpers/authorization-request.d.ts.map +1 -1
- package/dist/account-manager/helpers/authorization-request.js.map +1 -1
- package/dist/account-manager/helpers/authorized-client.d.ts +2 -2
- package/dist/account-manager/helpers/authorized-client.d.ts.map +1 -1
- package/dist/account-manager/helpers/authorized-client.js.map +1 -1
- package/dist/account-manager/helpers/device.d.ts +3 -3
- package/dist/account-manager/helpers/device.d.ts.map +1 -1
- package/dist/account-manager/helpers/device.js.map +1 -1
- package/dist/account-manager/helpers/email-token.d.ts +2 -2
- package/dist/account-manager/helpers/email-token.d.ts.map +1 -1
- package/dist/account-manager/helpers/email-token.js.map +1 -1
- package/dist/account-manager/helpers/invite.d.ts +3 -3
- package/dist/account-manager/helpers/invite.d.ts.map +1 -1
- package/dist/account-manager/helpers/invite.js +1 -1
- package/dist/account-manager/helpers/invite.js.map +1 -1
- package/dist/account-manager/helpers/lexicon.d.ts +2 -2
- package/dist/account-manager/helpers/lexicon.d.ts.map +1 -1
- package/dist/account-manager/helpers/lexicon.js +1 -1
- package/dist/account-manager/helpers/lexicon.js.map +1 -1
- package/dist/account-manager/helpers/password.d.ts +3 -3
- package/dist/account-manager/helpers/password.d.ts.map +1 -1
- package/dist/account-manager/helpers/password.js.map +1 -1
- package/dist/account-manager/helpers/repo.d.ts +2 -2
- package/dist/account-manager/helpers/repo.d.ts.map +1 -1
- package/dist/account-manager/helpers/repo.js.map +1 -1
- package/dist/account-manager/helpers/token.d.ts +4 -4
- package/dist/account-manager/helpers/token.d.ts.map +1 -1
- package/dist/account-manager/helpers/token.js.map +1 -1
- package/dist/account-manager/helpers/used-refresh-token.d.ts +2 -2
- package/dist/account-manager/helpers/used-refresh-token.d.ts.map +1 -1
- package/dist/account-manager/helpers/used-refresh-token.js.map +1 -1
- package/dist/account-manager/oauth-store.d.ts +10 -10
- package/dist/account-manager/oauth-store.d.ts.map +1 -1
- package/dist/account-manager/oauth-store.js +3 -3
- package/dist/account-manager/oauth-store.js.map +1 -1
- package/dist/account-manager/scope-reference-getter.d.ts +4 -4
- package/dist/account-manager/scope-reference-getter.d.ts.map +1 -1
- package/dist/account-manager/scope-reference-getter.js +1 -1
- package/dist/account-manager/scope-reference-getter.js.map +1 -1
- package/dist/actor-store/actor-store-reader.d.ts +3 -3
- package/dist/actor-store/actor-store-reader.d.ts.map +1 -1
- package/dist/actor-store/actor-store-reader.js.map +1 -1
- package/dist/actor-store/actor-store-resources.d.ts +2 -2
- package/dist/actor-store/actor-store-resources.d.ts.map +1 -1
- package/dist/actor-store/actor-store-resources.js.map +1 -1
- package/dist/actor-store/actor-store-transactor.d.ts +3 -3
- package/dist/actor-store/actor-store-transactor.d.ts.map +1 -1
- package/dist/actor-store/actor-store-transactor.js.map +1 -1
- package/dist/actor-store/actor-store.d.ts +4 -4
- package/dist/actor-store/actor-store.d.ts.map +1 -1
- package/dist/actor-store/actor-store.js.map +1 -1
- package/dist/actor-store/blob/reader.d.ts +6 -6
- package/dist/actor-store/blob/reader.d.ts.map +1 -1
- package/dist/actor-store/blob/reader.js.map +1 -1
- package/dist/actor-store/blob/transactor.d.ts +8 -8
- package/dist/actor-store/blob/transactor.d.ts.map +1 -1
- package/dist/actor-store/blob/transactor.js.map +1 -1
- package/dist/actor-store/db/index.d.ts +1 -1
- package/dist/actor-store/db/index.d.ts.map +1 -1
- package/dist/actor-store/db/index.js.map +1 -1
- package/dist/actor-store/db/migrations/001-init.d.ts +1 -1
- package/dist/actor-store/db/migrations/001-init.d.ts.map +1 -1
- package/dist/actor-store/db/migrations/001-init.js.map +1 -1
- package/dist/actor-store/db/schema/account-pref.d.ts +1 -1
- package/dist/actor-store/db/schema/account-pref.d.ts.map +1 -1
- package/dist/actor-store/db/schema/account-pref.js.map +1 -1
- package/dist/actor-store/db/schema/index.d.ts +7 -7
- package/dist/actor-store/db/schema/index.d.ts.map +1 -1
- package/dist/actor-store/db/schema/index.js.map +1 -1
- package/dist/actor-store/migrate.d.ts +1 -1
- package/dist/actor-store/migrate.d.ts.map +1 -1
- package/dist/actor-store/migrate.js.map +1 -1
- package/dist/actor-store/preference/reader.d.ts +2 -2
- package/dist/actor-store/preference/reader.d.ts.map +1 -1
- package/dist/actor-store/preference/reader.js.map +1 -1
- package/dist/actor-store/preference/transactor.d.ts +2 -2
- package/dist/actor-store/preference/transactor.d.ts.map +1 -1
- package/dist/actor-store/preference/transactor.js.map +1 -1
- package/dist/actor-store/record/reader.d.ts +5 -5
- package/dist/actor-store/record/reader.d.ts.map +1 -1
- package/dist/actor-store/record/reader.js.map +1 -1
- package/dist/actor-store/record/transactor.d.ts +5 -5
- package/dist/actor-store/record/transactor.d.ts.map +1 -1
- package/dist/actor-store/record/transactor.js.map +1 -1
- package/dist/actor-store/repo/reader.d.ts +3 -3
- package/dist/actor-store/repo/reader.d.ts.map +1 -1
- package/dist/actor-store/repo/reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.d.ts +3 -3
- package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.d.ts +3 -3
- package/dist/actor-store/repo/sql-repo-transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/sql-repo-transactor.js.map +1 -1
- package/dist/actor-store/repo/transactor.d.ts +7 -7
- package/dist/actor-store/repo/transactor.d.ts.map +1 -1
- package/dist/actor-store/repo/transactor.js +1 -1
- package/dist/actor-store/repo/transactor.js.map +1 -1
- package/dist/api/app/bsky/actor/getPreferences.d.ts +2 -2
- package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.d.ts +2 -2
- package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.d.ts +2 -2
- package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
- package/dist/api/app/bsky/actor/index.d.ts +2 -2
- package/dist/api/app/bsky/actor/index.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/index.js.map +1 -1
- package/dist/api/app/bsky/actor/putPreferences.d.ts +2 -2
- package/dist/api/app/bsky/actor/putPreferences.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.d.ts +2 -2
- package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -2
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.d.ts +2 -2
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +1 -1
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.d.ts +2 -2
- package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.d.ts +2 -2
- package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
- package/dist/api/app/bsky/feed/index.d.ts +2 -2
- package/dist/api/app/bsky/feed/index.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/index.js.map +1 -1
- package/dist/api/app/bsky/index.d.ts +2 -2
- package/dist/api/app/bsky/index.d.ts.map +1 -1
- package/dist/api/app/bsky/index.js.map +1 -1
- package/dist/api/app/bsky/notification/index.d.ts +2 -2
- package/dist/api/app/bsky/notification/index.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/index.js.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.d.ts +2 -2
- package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
- package/dist/api/app/bsky/notification/unregisterPush.d.ts +2 -2
- package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -1
- package/dist/api/app/bsky/util/resolver.d.ts +1 -1
- package/dist/api/app/bsky/util/resolver.d.ts.map +1 -1
- package/dist/api/app/bsky/util/resolver.js +1 -1
- package/dist/api/app/bsky/util/resolver.js.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.d.ts +2 -2
- package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/admin/disableAccountInvites.d.ts +2 -2
- package/dist/api/com/atproto/admin/disableAccountInvites.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/disableAccountInvites.js.map +1 -1
- package/dist/api/com/atproto/admin/disableInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/admin/disableInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/disableInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/admin/enableAccountInvites.d.ts +2 -2
- package/dist/api/com/atproto/admin/enableAccountInvites.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/enableAccountInvites.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts +2 -2
- package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts +2 -2
- package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
- package/dist/api/com/atproto/admin/getInviteCodes.d.ts +3 -3
- package/dist/api/com/atproto/admin/getInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +2 -2
- package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/admin/index.d.ts +2 -2
- package/dist/api/com/atproto/admin/index.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/index.js.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.d.ts +2 -2
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +2 -2
- package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
- package/dist/api/com/atproto/admin/util.d.ts +4 -4
- package/dist/api/com/atproto/admin/util.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/util.js.map +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts +2 -2
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
- package/dist/api/com/atproto/identity/index.d.ts +2 -2
- package/dist/api/com/atproto/identity/index.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/index.js.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts +2 -2
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
- package/dist/api/com/atproto/identity/resolveHandle.d.ts +2 -2
- package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts +2 -2
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts +2 -2
- package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.d.ts +2 -2
- package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/index.d.ts +2 -2
- package/dist/api/com/atproto/index.d.ts.map +1 -1
- package/dist/api/com/atproto/index.js.map +1 -1
- package/dist/api/com/atproto/moderation/createReport.d.ts +2 -2
- package/dist/api/com/atproto/moderation/createReport.d.ts.map +1 -1
- package/dist/api/com/atproto/moderation/createReport.js.map +1 -1
- package/dist/api/com/atproto/moderation/index.d.ts +2 -2
- package/dist/api/com/atproto/moderation/index.d.ts.map +1 -1
- package/dist/api/com/atproto/moderation/index.js.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.d.ts +2 -2
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.d.ts +2 -2
- package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.d.ts +2 -2
- package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
- package/dist/api/com/atproto/repo/index.d.ts +2 -2
- package/dist/api/com/atproto/repo/index.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/index.js.map +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.d.ts +2 -2
- package/dist/api/com/atproto/repo/listMissingBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.d.ts +2 -2
- package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts +2 -2
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.d.ts +2 -2
- package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/uploadBlob.js +9 -2
- package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.d.ts +2 -2
- package/dist/api/com/atproto/server/checkAccountStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.d.ts +2 -2
- package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
- package/dist/api/com/atproto/server/createAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAccount.js +1 -1
- package/dist/api/com/atproto/server/createAccount.js.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/createInviteCode.d.ts +2 -2
- package/dist/api/com/atproto/server/createInviteCode.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createInviteCode.js.map +1 -1
- package/dist/api/com/atproto/server/createInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/server/createInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.d.ts +2 -2
- package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +1 -1
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts +2 -2
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.d.ts +2 -2
- package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/api/com/atproto/server/describeServer.d.ts +2 -2
- package/dist/api/com/atproto/server/describeServer.d.ts.map +1 -1
- package/dist/api/com/atproto/server/describeServer.js.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts +2 -2
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.d.ts +2 -2
- package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.d.ts +2 -2
- package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +1 -1
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/index.d.ts +2 -2
- package/dist/api/com/atproto/server/index.d.ts.map +1 -1
- package/dist/api/com/atproto/server/index.js.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.d.ts +2 -2
- package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.d.ts +2 -2
- package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +1 -1
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts +2 -2
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts +3 -3
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts +3 -3
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts +2 -2
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
- package/dist/api/com/atproto/server/reserveSigningKey.d.ts +2 -2
- package/dist/api/com/atproto/server/reserveSigningKey.d.ts.map +1 -1
- package/dist/api/com/atproto/server/reserveSigningKey.js.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts +2 -2
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.d.ts +2 -2
- package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
- package/dist/api/com/atproto/server/util.d.ts +4 -4
- package/dist/api/com/atproto/server/util.d.ts.map +1 -1
- package/dist/api/com/atproto/server/util.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts +2 -2
- package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts +2 -2
- package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.d.ts +2 -2
- package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.d.ts +2 -2
- package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts +2 -2
- package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts +2 -2
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.d.ts +3 -3
- package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts +2 -2
- package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -1
- package/dist/api/com/atproto/sync/index.d.ts +2 -2
- package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/index.js.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.d.ts +2 -2
- package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.d.ts +3 -3
- package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/listRepos.js +1 -1
- package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts +2 -2
- package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/api/com/atproto/sync/util.d.ts +3 -3
- package/dist/api/com/atproto/sync/util.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/util.js.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.d.ts +2 -2
- package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
- package/dist/api/com/atproto/temp/index.d.ts +2 -2
- package/dist/api/com/atproto/temp/index.d.ts.map +1 -1
- package/dist/api/com/atproto/temp/index.js.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/proxy.d.ts +2 -2
- package/dist/api/proxy.d.ts.map +1 -1
- package/dist/api/proxy.js.map +1 -1
- package/dist/auth-output.d.ts +3 -3
- package/dist/auth-output.d.ts.map +1 -1
- package/dist/auth-output.js.map +1 -1
- package/dist/auth-routes.d.ts +1 -1
- package/dist/auth-routes.d.ts.map +1 -1
- package/dist/auth-routes.js +4 -2
- package/dist/auth-routes.js.map +1 -1
- package/dist/auth-verifier.d.ts +11 -11
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +2 -2
- package/dist/auth-verifier.js.map +1 -1
- package/dist/basic-routes.d.ts +1 -1
- package/dist/basic-routes.d.ts.map +1 -1
- package/dist/basic-routes.js.map +1 -1
- package/dist/config/config.d.ts +4 -3
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +1 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +1 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +1 -0
- package/dist/config/env.js.map +1 -1
- package/dist/config/secrets.d.ts +1 -1
- package/dist/config/secrets.d.ts.map +1 -1
- package/dist/config/secrets.js.map +1 -1
- package/dist/context.d.ts +8 -8
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +4 -2
- package/dist/context.js.map +1 -1
- package/dist/crawlers.d.ts +1 -1
- package/dist/crawlers.d.ts.map +1 -1
- package/dist/crawlers.js.map +1 -1
- package/dist/db/db.js.map +1 -1
- package/dist/db/migrator.d.ts +2 -2
- package/dist/db/migrator.d.ts.map +1 -1
- package/dist/db/migrator.js.map +1 -1
- package/dist/db/pagination.d.ts +2 -2
- package/dist/db/pagination.d.ts.map +1 -1
- package/dist/db/pagination.js.map +1 -1
- package/dist/db/tables/moderation.d.ts +2 -2
- package/dist/db/tables/moderation.d.ts.map +1 -1
- package/dist/db/tables/moderation.js.map +1 -1
- package/dist/db/util.d.ts +1 -1
- package/dist/db/util.d.ts.map +1 -1
- package/dist/db/util.js.map +1 -1
- package/dist/did-cache/db/index.d.ts +1 -1
- package/dist/did-cache/db/index.d.ts.map +1 -1
- package/dist/did-cache/db/index.js.map +1 -1
- package/dist/did-cache/db/migrations.d.ts +1 -1
- package/dist/did-cache/db/migrations.d.ts.map +1 -1
- package/dist/did-cache/db/migrations.js.map +1 -1
- package/dist/did-cache/index.d.ts +2 -2
- package/dist/did-cache/index.d.ts.map +1 -1
- package/dist/did-cache/index.js.map +1 -1
- package/dist/disk-blobstore.d.ts +3 -3
- package/dist/disk-blobstore.d.ts.map +1 -1
- package/dist/disk-blobstore.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +1 -1
- package/dist/error.js.map +1 -1
- package/dist/image/image-url-builder.d.ts +1 -1
- package/dist/image/image-url-builder.d.ts.map +1 -1
- package/dist/image/image-url-builder.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lexicons/app/bsky/actor/defs.defs.d.ts +1 -1
- package/dist/lexicons/app/bsky/actor/defs.defs.js.map +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/mailer/index.d.ts +2 -2
- package/dist/mailer/index.d.ts.map +1 -1
- package/dist/mailer/index.js.map +1 -1
- package/dist/mailer/moderation.d.ts +2 -2
- package/dist/mailer/moderation.d.ts.map +1 -1
- package/dist/mailer/moderation.js.map +1 -1
- package/dist/pipethrough.d.ts +7 -7
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js.map +1 -1
- package/dist/read-after-write/types.d.ts +4 -4
- package/dist/read-after-write/types.d.ts.map +1 -1
- package/dist/read-after-write/types.js.map +1 -1
- package/dist/read-after-write/util.d.ts +5 -5
- package/dist/read-after-write/util.d.ts.map +1 -1
- package/dist/read-after-write/util.js.map +1 -1
- package/dist/read-after-write/viewer.d.ts +7 -7
- package/dist/read-after-write/viewer.d.ts.map +1 -1
- package/dist/read-after-write/viewer.js +1 -1
- package/dist/read-after-write/viewer.js.map +1 -1
- package/dist/repo/prepare.d.ts +4 -4
- package/dist/repo/prepare.d.ts.map +1 -1
- package/dist/repo/prepare.js.map +1 -1
- package/dist/repo/types.d.ts +3 -3
- package/dist/repo/types.d.ts.map +1 -1
- package/dist/repo/types.js.map +1 -1
- package/dist/scripts/publish-identity.d.ts +2 -2
- package/dist/scripts/publish-identity.d.ts.map +1 -1
- package/dist/scripts/publish-identity.js.map +1 -1
- package/dist/scripts/rebuild-repo.d.ts +4 -4
- package/dist/scripts/rebuild-repo.d.ts.map +1 -1
- package/dist/scripts/rebuild-repo.js.map +1 -1
- package/dist/scripts/rotate-keys.d.ts +6 -6
- package/dist/scripts/rotate-keys.d.ts.map +1 -1
- package/dist/scripts/rotate-keys.js.map +1 -1
- package/dist/scripts/sequencer-recovery/index.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/index.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/index.js.map +1 -1
- package/dist/scripts/sequencer-recovery/recoverer.d.ts +4 -4
- package/dist/scripts/sequencer-recovery/recoverer.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/recoverer.js.map +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/recovery-db.js.map +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.d.ts +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.d.ts.map +1 -1
- package/dist/scripts/sequencer-recovery/repair-repos.js.map +1 -1
- package/dist/sequencer/db/index.d.ts +1 -1
- package/dist/sequencer/db/index.d.ts.map +1 -1
- package/dist/sequencer/db/index.js.map +1 -1
- package/dist/sequencer/db/migrations/001-init.d.ts +1 -1
- package/dist/sequencer/db/migrations/001-init.d.ts.map +1 -1
- package/dist/sequencer/db/migrations/001-init.js.map +1 -1
- package/dist/sequencer/db/schema.d.ts +1 -1
- package/dist/sequencer/db/schema.d.ts.map +1 -1
- package/dist/sequencer/db/schema.js.map +1 -1
- package/dist/sequencer/events.d.ts +3 -3
- package/dist/sequencer/events.d.ts.map +1 -1
- package/dist/sequencer/events.js.map +1 -1
- package/dist/sequencer/outbox.d.ts +1 -1
- package/dist/sequencer/outbox.d.ts.map +1 -1
- package/dist/sequencer/outbox.js.map +1 -1
- package/dist/sequencer/sequencer.d.ts +5 -5
- package/dist/sequencer/sequencer.d.ts.map +1 -1
- package/dist/sequencer/sequencer.js.map +1 -1
- package/dist/util/compression.js.map +1 -1
- package/dist/util/http.d.ts +1 -1
- package/dist/util/http.d.ts.map +1 -1
- package/dist/util/http.js.map +1 -1
- package/dist/well-known.d.ts +1 -1
- package/dist/well-known.d.ts.map +1 -1
- package/dist/well-known.js.map +1 -1
- package/package.json +25 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../../../../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../../../../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): void;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AAEpD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC/B,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport checkSignupQueue from './checkSignupQueue.js'\n\nexport default function (server: Server, ctx: AppContext) {\n checkSignupQueue(server, ctx)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AAEpD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAC/B,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport checkSignupQueue from './checkSignupQueue.js'\n\nexport default function (server: Server, ctx: AppContext) {\n checkSignupQueue(server, ctx)\n}\n"]}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Server } from '@atproto/xrpc-server';
|
|
2
|
-
import { AppContext } from '../context.js';
|
|
1
|
+
import type { Server } from '@atproto/xrpc-server';
|
|
2
|
+
import type { AppContext } from '../context.js';
|
|
3
3
|
export default function (server: Server, ctx: AppContext): Server;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,UAIvD"}
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,qBAAqB,CAAA;AACzC,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../context.js'\nimport appBsky from './app/bsky/index.js'\nimport comAtproto from './com/atproto/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n comAtproto(server, ctx)\n appBsky(server, ctx)\n return server\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,qBAAqB,CAAA;AACzC,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../context.js'\nimport appBsky from './app/bsky/index.js'\nimport comAtproto from './com/atproto/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n comAtproto(server, ctx)\n appBsky(server, ctx)\n return server\n}\n"]}
|
package/dist/api/proxy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IncomingMessage } from 'node:http';
|
|
2
|
-
import express from 'express';
|
|
1
|
+
import type { IncomingMessage } from 'node:http';
|
|
2
|
+
import type express from 'express';
|
|
3
3
|
export declare function authPassthru(req: IncomingMessage): {
|
|
4
4
|
headers: {
|
|
5
5
|
authorization: string;
|
package/dist/api/proxy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAGlC,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe;;;;cAuBhD;AAID,eAAO,MAAM,YAAY,QAClB,OAAO,CAAC,OAAO,UACZ,YAAY,GAAG,SAAS,iBAQjC,CAAA;AAED,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAA"}
|
package/dist/api/proxy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,UAAU,YAAY,CAAC,GAAoB;IAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,OAAO,CAAA;IAErC,IAAI,aAAa,EAAE,CAAC;QAClB,4EAA4E;QAC5E,qEAAqE;QACrE,oEAAoE;QACpE,qEAAqE;QACrE,qBAAqB;QAErB,wEAAwE;QACxE,2EAA2E;QAC3E,0BAA0B;QAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;QAC/D,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,mBAAmB,CAAC,iCAAiC,CAAC,CAAA;QAClE,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,CAAA;IACvC,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,GAAoB,EACpB,MAAgC,EAChC,EAAE;IACF,MAAM,MAAM,GAAiB,MAAM,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;IACtD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAA;IACjB,IAAI,EAAE,EAAE,CAAC;QACP,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAA;IACxC,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import { IncomingMessage } from 'node:http'\nimport express from 'express'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\n\nexport function authPassthru(req: IncomingMessage) {\n const { authorization } = req.headers\n\n if (authorization) {\n // DPoP requests are bound to the endpoint being called. Allowing them to be\n // proxied would require that the receiving end allows DPoP proof not\n // created for him. Since proxying is mainly there to support legacy\n // clients, and DPoP is a new feature, we don't support DPoP requests\n // through the proxy.\n\n // This is fine since app views are usually called using the requester's\n // credentials when \"auth.credentials.type === 'access'\", which is the only\n // case were DPoP is used.\n const [type] = authorization.split(' ', 1)\n if (!type) {\n throw new InvalidRequestError('Invalid authorization header')\n }\n if (type.toLowerCase() === 'dpop' || req.headers['dpop']) {\n throw new InvalidRequestError('DPoP requests cannot be proxied')\n }\n\n return { headers: { authorization } }\n }\n}\n\n// @NOTE this function may mutate its params input\n// future improvement here would be to forward along all untrusted ips rather than just the first (req.ip)\nexport const forwardedFor = (\n req: express.Request,\n params: HeadersParam | undefined,\n) => {\n const result: HeadersParam = params ?? { headers: {} }\n const ip = req.ip\n if (ip) {\n result.headers['x-forwarded-for'] = ip\n }\n return result\n}\n\ntype HeadersParam = { headers: Record<string, string> }\n"]}
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/api/proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,UAAU,YAAY,CAAC,GAAoB;IAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC,OAAO,CAAA;IAErC,IAAI,aAAa,EAAE,CAAC;QAClB,4EAA4E;QAC5E,qEAAqE;QACrE,oEAAoE;QACpE,qEAAqE;QACrE,qBAAqB;QAErB,wEAAwE;QACxE,2EAA2E;QAC3E,0BAA0B;QAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,CAAC,CAAA;QAC/D,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,mBAAmB,CAAC,iCAAiC,CAAC,CAAA;QAClE,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,CAAA;IACvC,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,GAAoB,EACpB,MAAgC,EAChC,EAAE;IACF,MAAM,MAAM,GAAiB,MAAM,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;IACtD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAA;IACjB,IAAI,EAAE,EAAE,CAAC;QACP,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAA;IACxC,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import type { IncomingMessage } from 'node:http'\nimport type express from 'express'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\n\nexport function authPassthru(req: IncomingMessage) {\n const { authorization } = req.headers\n\n if (authorization) {\n // DPoP requests are bound to the endpoint being called. Allowing them to be\n // proxied would require that the receiving end allows DPoP proof not\n // created for him. Since proxying is mainly there to support legacy\n // clients, and DPoP is a new feature, we don't support DPoP requests\n // through the proxy.\n\n // This is fine since app views are usually called using the requester's\n // credentials when \"auth.credentials.type === 'access'\", which is the only\n // case were DPoP is used.\n const [type] = authorization.split(' ', 1)\n if (!type) {\n throw new InvalidRequestError('Invalid authorization header')\n }\n if (type.toLowerCase() === 'dpop' || req.headers['dpop']) {\n throw new InvalidRequestError('DPoP requests cannot be proxied')\n }\n\n return { headers: { authorization } }\n }\n}\n\n// @NOTE this function may mutate its params input\n// future improvement here would be to forward along all untrusted ips rather than just the first (req.ip)\nexport const forwardedFor = (\n req: express.Request,\n params: HeadersParam | undefined,\n) => {\n const result: HeadersParam = params ?? { headers: {} }\n const ip = req.ip\n if (ip) {\n result.headers['x-forwarded-for'] = ip\n }\n return result\n}\n\ntype HeadersParam = { headers: Record<string, string> }\n"]}
|
package/dist/auth-output.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ScopePermissions } from '@atproto/oauth-scopes';
|
|
2
|
-
import { DidString } from '@atproto/syntax';
|
|
3
|
-
import { AuthScope } from './auth-scope.js';
|
|
1
|
+
import type { ScopePermissions } from '@atproto/oauth-scopes';
|
|
2
|
+
import type { DidString } from '@atproto/syntax';
|
|
3
|
+
import type { AuthScope } from './auth-scope.js';
|
|
4
4
|
export type UnauthenticatedOutput = {
|
|
5
5
|
credentials: null;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-output.d.ts","sourceRoot":"","sources":["../src/auth-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"auth-output.d.ts","sourceRoot":"","sources":["../src/auth-output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE;QACX,IAAI,EAAE,aAAa,CAAA;KACpB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE;QACX,IAAI,EAAE,aAAa,CAAA;QACnB,GAAG,EAAE,SAAS,CAAA;KACf,CAAA;CACF,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI;IAC1D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAA;QACd,GAAG,EAAE,SAAS,CAAA;QACd,KAAK,EAAE,CAAC,CAAA;KACT,CAAA;CACF,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE;QACX,IAAI,EAAE,OAAO,CAAA;QACb,GAAG,EAAE,SAAS,CAAA;QACd,WAAW,EAAE,gBAAgB,CAAA;KAC9B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,SAAS,CAAA;QACf,GAAG,EAAE,SAAS,CAAA;QACd,KAAK,EAAE,SAAS,CAAC,OAAO,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE;QACX,IAAI,EAAE,mBAAmB,CAAA;QACzB,GAAG,EAAE,SAAS,CAAA;KACf,CAAA;CACF,CAAA"}
|
package/dist/auth-output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-output.js","sourceRoot":"","sources":["../src/auth-output.ts"],"names":[],"mappings":"","sourcesContent":["import { ScopePermissions } from '@atproto/oauth-scopes'\nimport { DidString } from '@atproto/syntax'\nimport { AuthScope } from './auth-scope.js'\n\nexport type UnauthenticatedOutput = {\n credentials: null\n}\n\nexport type AdminTokenOutput = {\n credentials: {\n type: 'admin_token'\n }\n}\n\nexport type ModServiceOutput = {\n credentials: {\n type: 'mod_service'\n did: DidString\n }\n}\n\nexport type AccessOutput<S extends AuthScope = AuthScope> = {\n credentials: {\n type: 'access'\n did: DidString\n scope: S\n }\n}\n\nexport type OAuthOutput = {\n credentials: {\n type: 'oauth'\n did: DidString\n permissions: ScopePermissions\n }\n}\n\nexport type RefreshOutput = {\n credentials: {\n type: 'refresh'\n did: DidString\n scope: AuthScope.Refresh\n tokenId: string\n }\n}\n\nexport type UserServiceAuthOutput = {\n credentials: {\n type: 'user_service_auth'\n did: DidString\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auth-output.js","sourceRoot":"","sources":["../src/auth-output.ts"],"names":[],"mappings":"","sourcesContent":["import type { ScopePermissions } from '@atproto/oauth-scopes'\nimport type { DidString } from '@atproto/syntax'\nimport type { AuthScope } from './auth-scope.js'\n\nexport type UnauthenticatedOutput = {\n credentials: null\n}\n\nexport type AdminTokenOutput = {\n credentials: {\n type: 'admin_token'\n }\n}\n\nexport type ModServiceOutput = {\n credentials: {\n type: 'mod_service'\n did: DidString\n }\n}\n\nexport type AccessOutput<S extends AuthScope = AuthScope> = {\n credentials: {\n type: 'access'\n did: DidString\n scope: S\n }\n}\n\nexport type OAuthOutput = {\n credentials: {\n type: 'oauth'\n did: DidString\n permissions: ScopePermissions\n }\n}\n\nexport type RefreshOutput = {\n credentials: {\n type: 'refresh'\n did: DidString\n scope: AuthScope.Refresh\n tokenId: string\n }\n}\n\nexport type UserServiceAuthOutput = {\n credentials: {\n type: 'user_service_auth'\n did: DidString\n }\n}\n"]}
|
package/dist/auth-routes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-routes.d.ts","sourceRoot":"","sources":["../src/auth-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAShC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"auth-routes.d.ts","sourceRoot":"","sources":["../src/auth-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAShC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,eAAO,MAAM,YAAY,2BAA4B,UAAU,KAAG,MAsCjE,CAAA"}
|
package/dist/auth-routes.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
|
-
import { HandleUnavailableError, InvalidRequestError, SecondAuthenticationFactorRequiredError, UseDpopNonceError,
|
|
2
|
+
import { HandleUnavailableError, InvalidRequestError, SecondAuthenticationFactorRequiredError, UseDpopNonceError, } from '@atproto/oauth-provider/errors';
|
|
3
|
+
import { oauthMiddleware } from '@atproto/oauth-provider/middleware';
|
|
4
|
+
import { buildProtectedResourceMetadata } from '@atproto/oauth-provider/utils';
|
|
3
5
|
import { oauthLogger, reqSerializer } from './logger.js';
|
|
4
6
|
export const createRouter = ({ oauthProvider, cfg }) => {
|
|
5
7
|
const router = Router();
|
|
6
|
-
const oauthProtectedResourceMetadata =
|
|
8
|
+
const oauthProtectedResourceMetadata = buildProtectedResourceMetadata({
|
|
7
9
|
resource: cfg.service.publicUrl,
|
|
8
10
|
authorization_servers: [cfg.entryway?.url ?? cfg.service.publicUrl],
|
|
9
11
|
bearer_methods_supported: ['header'],
|
package/dist/auth-routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-routes.js","sourceRoot":"","sources":["../src/auth-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uCAAuC,EACvC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"auth-routes.js","sourceRoot":"","sources":["../src/auth-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uCAAuC,EACvC,iBAAiB,GAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAA;AAE9E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,aAAa,EAAE,GAAG,EAAc,EAAU,EAAE;IACzE,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IAEvB,MAAM,8BAA8B,GAAG,8BAA8B,CAAC;QACpE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,SAAS;QAC/B,qBAAqB,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;QACnE,wBAAwB,EAAE,CAAC,QAAQ,CAAC;QACpC,gBAAgB,EAAE,EAAE;QACpB,sBAAsB,EAAE,qBAAqB;KAC9C,CAAC,CAAA;IAEF,IACE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;QACpB,CAAC,8BAA8B,CAAC,QAAQ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FactorRequiredError,\n UseDpopNonceError,\n} from '@atproto/oauth-provider/errors'\nimport { oauthMiddleware } from '@atproto/oauth-provider/middleware'\nimport { buildProtectedResourceMetadata } from '@atproto/oauth-provider/utils'\nimport type { AppContext } from './context.js'\nimport { oauthLogger, reqSerializer } from './logger.js'\n\nexport const createRouter = ({ oauthProvider, cfg }: AppContext): Router => {\n const router = Router()\n\n const oauthProtectedResourceMetadata = buildProtectedResourceMetadata({\n resource: cfg.service.publicUrl,\n authorization_servers: [cfg.entryway?.url ?? cfg.service.publicUrl],\n bearer_methods_supported: ['header'],\n scopes_supported: [],\n resource_documentation: 'https://atproto.com',\n })\n\n if (\n !cfg.service.devMode &&\n !oauthProtectedResourceMetadata.resource.startsWith('https://')\n ) {\n throw new Error('Resource URL must use the https scheme')\n }\n\n router.get('/.well-known/oauth-protected-resource', (req, res) => {\n res.setHeader('Access-Control-Allow-Origin', '*')\n res.setHeader('Access-Control-Allow-Method', '*')\n res.setHeader('Access-Control-Allow-Headers', '*')\n res.status(200).json(oauthProtectedResourceMetadata)\n })\n\n if (oauthProvider) {\n router.use(\n oauthMiddleware(oauthProvider, {\n onError: (req, res, err, msg) => {\n if (!ignoreError(err)) {\n oauthLogger.error({ err, req: reqSerializer(req) }, msg)\n }\n },\n }),\n )\n }\n\n return router\n}\n\nfunction ignoreError(err: unknown): boolean {\n if (err instanceof InvalidRequestError) {\n return err.error_description === 'Invalid identifier or password'\n }\n\n return (\n err instanceof UseDpopNonceError ||\n err instanceof HandleUnavailableError ||\n err instanceof SecondAuthenticationFactorRequiredError\n )\n}\n"]}
|
package/dist/auth-verifier.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { KeyObject } from 'node:crypto';
|
|
2
|
-
import { IncomingMessage } from 'node:http';
|
|
1
|
+
import { type KeyObject } from 'node:crypto';
|
|
2
|
+
import type { IncomingMessage } from 'node:http';
|
|
3
3
|
import * as jose from 'jose';
|
|
4
|
-
import { IdResolver } from '@atproto/identity';
|
|
5
|
-
import { AtIdentifierString, DidString } from '@atproto/lex';
|
|
6
|
-
import { OAuthVerifier } from '@atproto/oauth-provider';
|
|
7
|
-
import { ScopePermissions } from '@atproto/oauth-scopes';
|
|
8
|
-
import { Awaitable, MethodAuthContext, MethodAuthVerifier, Params } from '@atproto/xrpc-server';
|
|
9
|
-
import { AccountManager } from './account-manager/account-manager.js';
|
|
10
|
-
import { ActorAccount } from './account-manager/helpers/account.js';
|
|
11
|
-
import { AccessOutput, AdminTokenOutput, ModServiceOutput, OAuthOutput, RefreshOutput, UnauthenticatedOutput, UserServiceAuthOutput } from './auth-output.js';
|
|
4
|
+
import { type IdResolver } from '@atproto/identity';
|
|
5
|
+
import { type AtIdentifierString, type DidString } from '@atproto/lex';
|
|
6
|
+
import type { OAuthVerifier } from '@atproto/oauth-provider/verifier';
|
|
7
|
+
import { type ScopePermissions } from '@atproto/oauth-scopes';
|
|
8
|
+
import { type Awaitable, type MethodAuthContext, type MethodAuthVerifier, type Params } from '@atproto/xrpc-server';
|
|
9
|
+
import type { AccountManager } from './account-manager/account-manager.js';
|
|
10
|
+
import type { ActorAccount } from './account-manager/helpers/account.js';
|
|
11
|
+
import type { AccessOutput, AdminTokenOutput, ModServiceOutput, OAuthOutput, RefreshOutput, UnauthenticatedOutput, UserServiceAuthOutput } from './auth-output.js';
|
|
12
12
|
import { AuthScope } from './auth-scope.js';
|
|
13
|
-
import { WithRequired } from './util/types.js';
|
|
13
|
+
import type { WithRequired } from './util/types.js';
|
|
14
14
|
export type VerifiedOptions = {
|
|
15
15
|
checkTakedown?: boolean;
|
|
16
16
|
checkDeactivated?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-verifier.d.ts","sourceRoot":"","sources":["../src/auth-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"auth-verifier.d.ts","sourceRoot":"","sources":["../src/auth-verif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ose';
|
|
|
3
3
|
import KeyEncoderModule from 'key-encoder';
|
|
4
4
|
import { getVerificationMaterial } from '@atproto/common';
|
|
5
5
|
import { getDidKeyFromMultibase } from '@atproto/identity';
|
|
6
|
-
import { isDidString } from '@atproto/lex';
|
|
7
|
-
import { OAuthError, WWWAuthenticateError, } from '@atproto/oauth-provider';
|
|
6
|
+
import { isDidString, } from '@atproto/lex';
|
|
7
|
+
import { OAuthError, WWWAuthenticateError, } from '@atproto/oauth-provider/errors';
|
|
8
8
|
import { ScopePermissionsTransition, } from '@atproto/oauth-scopes';
|
|
9
9
|
import { AuthRequiredError, ForbiddenError, InvalidRequestError, XRPCError, parseReqNsid, verifyJwt as verifyServiceJwt, } from '@atproto/xrpc-server';
|
|
10
10
|
import { ACCESS_STANDARD, AuthScope, isAuthScope } from './auth-scope.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-verifier.js","sourceRoot":"","sources":["../src/auth-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEzE,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,gBAAgB,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAc,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAAiC,WAAW,EAAE,MAAM,cAAc,CAAA;AACzE,OAAO,EACL,UAAU,EAGV,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAEL,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,iBAAiB,EAEjB,cAAc,EACd,mBAAmB,EAInB,SAAS,EACT,YAAY,EACZ,SAAS,IAAI,gBAAgB,GAC9B,MAAM,sBAAsB,CAAA;AAY7B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB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GAAG,CAAC,CAAC,CAAA;QACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAa,EAAE;IACjE,OAAO,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC7C,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAoB,EAAa,EAAE;IACvE,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/D,OAAO,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;AAChD,CAAC,CAAA;AAED,SAAS,cAAc,CAAC,GAAmB;IACzC,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;IACzC,UAAU,CAAC,GAAG,EAAE,eAAe,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import { KeyObject, createPublicKey, createSecretKey } from 'node:crypto'\nimport { IncomingMessage, ServerResponse } from 'node:http'\nimport * as jose from 'jose'\nimport KeyEncoderModule from 'key-encoder'\nimport { getVerificationMaterial } from '@atproto/common'\nimport { IdResolver, getDidKeyFromMultibase } from '@atproto/identity'\nimport { AtIdentifierString, DidString, isDidString } from '@atproto/lex'\nimport {\n OAuthError,\n OAuthVerifier,\n VerifyTokenPayloadOptions,\n WWWAuthenticateError,\n} from '@atproto/oauth-provider'\nimport {\n ScopePermissions,\n ScopePermissionsTransition,\n} from '@atproto/oauth-scopes'\nimport {\n AuthRequiredError,\n Awaitable,\n ForbiddenError,\n InvalidRequestError,\n MethodAuthContext,\n MethodAuthVerifier,\n Params,\n XRPCError,\n parseReqNsid,\n verifyJwt as verifyServiceJwt,\n} from '@atproto/xrpc-server'\nimport { AccountManager } from './account-manager/account-manager.js'\nimport { ActorAccount } from './account-manager/helpers/account.js'\nimport {\n AccessOutput,\n AdminTokenOutput,\n ModServiceOutput,\n OAuthOutput,\n RefreshOutput,\n UnauthenticatedOutput,\n UserServiceAuthOutput,\n} from './auth-output.js'\nimport { ACCESS_STANDARD, AuthScope, isAuthScope } from './auth-scope.js'\nimport { softDeleted } from './db/index.js'\nimport { appendVary } from './util/http.js'\nimport { WithRequired } from './util/types.js'\n\n// key-encoder is CJS with exports.default; Node ESM interop wraps it as { default: Class }\nconst KeyEncoder = ((m) => m.default ?? m)(KeyEncoderModule)\n\nexport type VerifiedOptions = {\n checkTakedown?: boolean\n checkDeactivated?: boolean\n}\n\nexport type ScopedOptions<S extends AuthScope = AuthScope> = {\n scopes?: readonly S[]\n}\n\nexport type ExtraScopedOptions<S extends AuthScope = AuthScope> = {\n additional?: readonly S[]\n}\n\nexport type AuthorizedOptions<P extends Params = Params> = {\n authorize: (\n permissions: ScopePermissions,\n ctx: MethodAuthContext<P>,\n ) => Awaitable<void>\n}\n\nexport type AuthVerifierOpts = {\n publicUrl: string\n jwtKey: KeyObject\n adminPass: string\n dids: {\n pds: string\n entryway?: string\n modService?: string\n }\n}\n\nexport type VerifyBearerJwtOptions<S extends AuthScope = AuthScope> =\n WithRequired<\n Omit<jose.JWTVerifyOptions, 'scopes'> & {\n scopes: readonly S[]\n },\n 'audience' | 'typ'\n >\n\nexport type VerifyBearerJwtResult<S extends AuthScope = AuthScope> = {\n sub: DidString\n aud: string\n jti: string | undefined\n scope: S\n}\n\nexport class AuthVerifier {\n private _publicUrl: string\n private _jwtKey: KeyObject\n private _adminPass: string\n public dids: AuthVerifierOpts['dids']\n\n constructor(\n public accountManager: AccountManager,\n public idResolver: IdResolver,\n public oauthVerifier: OAuthVerifier,\n opts: AuthVerifierOpts,\n ) {\n this._publicUrl = opts.publicUrl\n this._jwtKey = opts.jwtKey\n this._adminPass = opts.adminPass\n this.dids = opts.dids\n }\n\n // verifiers (arrow fns to preserve scope)\n\n public unauthenticated: MethodAuthVerifier<UnauthenticatedOutput> = (ctx) => {\n setAuthHeaders(ctx.res)\n\n // @NOTE this auth method is typically used as fallback when no other auth\n // method is applicable. This means that the presence of an \"authorization\"\n // header means that that header is invalid (as it did not match any of the\n // other auth methods).\n if (ctx.req.headers['authorization']) {\n throw new AuthRequiredError('Invalid authorization header')\n }\n\n return {\n credentials: null,\n }\n }\n\n public adminToken: MethodAuthVerifier<AdminTokenOutput> = async (ctx) => {\n setAuthHeaders(ctx.res)\n const parsed = parseBasicAuth(ctx.req)\n if (!parsed) {\n throw new AuthRequiredError()\n }\n const { username, password } = parsed\n if (username !== 'admin' || password !== this._adminPass) {\n throw new AuthRequiredError()\n }\n\n return { credentials: { type: 'admin_token' } }\n }\n\n public modService: MethodAuthVerifier<ModServiceOutput> = async (ctx) => {\n setAuthHeaders(ctx.res)\n if (!this.dids.modService) {\n throw new AuthRequiredError('Untrusted issuer', 'UntrustedIss')\n }\n const payload = await this.verifyServiceJwt(ctx.req, {\n iss: [this.dids.modService, `${this.dids.modService}#atproto_labeler`],\n })\n return {\n credentials: {\n type: 'mod_service',\n did: payload.iss,\n },\n }\n }\n\n public moderator: MethodAuthVerifier<AdminTokenOutput | ModServiceOutput> =\n async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER) {\n return this.modService(ctx)\n } else {\n return this.adminToken(ctx)\n }\n }\n\n protected access<S extends AuthScope>(\n options: VerifiedOptions & Required<ScopedOptions<S>>,\n ): MethodAuthVerifier<AccessOutput<S>> {\n const { scopes, ...statusOptions } = options\n\n const verifyJwtOptions: VerifyBearerJwtOptions<S> = {\n audience: this.dids.pds,\n typ: 'at+jwt',\n scopes:\n // @NOTE We can reject taken down credentials based on the scope if\n // \"checkTakedown\" is set.\n statusOptions.checkTakedown && scopes.includes(AuthScope.Takendown as S)\n ? scopes.filter((s) => s !== AuthScope.Takendown)\n : scopes,\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const { sub: did, scope } = await this.verifyBearerJwt(\n ctx.req,\n verifyJwtOptions,\n )\n\n await this.verifyStatus(did, statusOptions)\n\n return {\n credentials: { type: 'access', did, scope },\n }\n }\n }\n\n public refresh(options?: {\n allowExpired?: boolean\n }): MethodAuthVerifier<RefreshOutput> {\n const verifyOptions: VerifyBearerJwtOptions<AuthScope.Refresh> = {\n clockTolerance: options?.allowExpired ? Infinity : undefined,\n typ: 'refresh+jwt',\n // when using entryway, proxying refresh credentials\n audience: this.dids.entryway ? this.dids.entryway : this.dids.pds,\n scopes: [AuthScope.Refresh],\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const result = await this.verifyBearerJwt(ctx.req, verifyOptions)\n\n const tokenId = result.jti\n if (!tokenId) {\n throw new AuthRequiredError(\n 'Unexpected missing refresh token id',\n 'MissingTokenId',\n )\n }\n\n return {\n credentials: {\n type: 'refresh',\n did: result.sub,\n scope: result.scope,\n tokenId,\n },\n }\n }\n }\n\n public authorization<P extends Params>({\n scopes = ACCESS_STANDARD,\n additional = [],\n ...options\n }: VerifiedOptions &\n ScopedOptions &\n ExtraScopedOptions &\n AuthorizedOptions<P>): MethodAuthVerifier<AccessOutput | OAuthOutput, P> {\n const access = this.access({\n ...options,\n scopes: [...scopes, ...additional],\n })\n const oauth = this.oauth(options)\n\n return async (ctx) => {\n const type = extractAuthType(ctx.req)\n\n if (type === AuthType.BEARER) {\n return access(ctx)\n }\n\n if (type === AuthType.DPOP) {\n return oauth(ctx)\n }\n\n // Auth headers are set through the access and oauth methods so we only\n // need to set them here if we reach this point\n setAuthHeaders(ctx.res)\n\n if (type !== null) {\n throw new InvalidRequestError(\n 'Unexpected authorization type',\n 'InvalidToken',\n )\n }\n\n throw new AuthRequiredError(undefined, 'AuthMissing')\n }\n }\n\n public authorizationOrAdminTokenOptional<P extends Params>(\n opts: VerifiedOptions & ExtraScopedOptions & AuthorizedOptions<P>,\n ): MethodAuthVerifier<\n OAuthOutput | AccessOutput | AdminTokenOutput | UnauthenticatedOutput,\n P\n > {\n const authorization = this.authorization(opts)\n return async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER || type === AuthType.DPOP) {\n return authorization(ctx)\n } else if (type === AuthType.BASIC) {\n return this.adminToken(ctx)\n } else {\n return this.unauthenticated(ctx)\n }\n }\n }\n\n public userServiceAuth: MethodAuthVerifier<UserServiceAuthOutput> = async (\n ctx,\n ) => {\n setAuthHeaders(ctx.res)\n const payload = await this.verifyServiceJwt(ctx.req)\n return {\n credentials: {\n type: 'user_service_auth',\n did: payload.iss,\n },\n }\n }\n\n public userServiceAuthOptional: MethodAuthVerifier<\n UserServiceAuthOutput | UnauthenticatedOutput\n > = async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER) {\n return await this.userServiceAuth(ctx)\n } else {\n return this.unauthenticated(ctx)\n }\n }\n\n public authorizationOrUserServiceAuth<P extends Params>(\n options: VerifiedOptions &\n ScopedOptions &\n ExtraScopedOptions &\n AuthorizedOptions<P>,\n ): MethodAuthVerifier<UserServiceAuthOutput | OAuthOutput | AccessOutput, P> {\n const authorizationVerifier = this.authorization(options)\n return async (ctx) => {\n if (isDefinitelyServiceAuth(ctx.req)) {\n return this.userServiceAuth(ctx)\n } else {\n return authorizationVerifier(ctx)\n }\n }\n }\n\n protected oauth<P extends Params>({\n authorize,\n ...verifyStatusOptions\n }: VerifiedOptions & AuthorizedOptions<P>): MethodAuthVerifier<\n OAuthOutput,\n P\n > {\n const verifyTokenOptions: VerifyTokenPayloadOptions = {\n audience: [this.dids.pds],\n scope: ['atproto'],\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const { req, res } = ctx\n\n // https://datatracker.ietf.org/doc/html/rfc9449#section-8.2\n const dpopNonce = this.oauthVerifier.nextDpopNonce()\n if (dpopNonce) {\n res.setHeader('DPoP-Nonce', dpopNonce)\n res.appendHeader('Access-Control-Expose-Headers', 'DPoP-Nonce')\n }\n\n const originalUrl = req.originalUrl || req.url || '/'\n const url = new URL(originalUrl, this._publicUrl)\n\n const { scope, sub: did } = await this.oauthVerifier\n .authenticateRequest(\n req.method || 'GET',\n url,\n req.headers,\n verifyTokenOptions,\n )\n .catch((err) => {\n // Make sure to include any WWW-Authenticate header in the response\n // (particularly useful for DPoP's \"use_dpop_nonce\" error)\n if (err instanceof WWWAuthenticateError) {\n res.setHeader('WWW-Authenticate', err.wwwAuthenticateHeader)\n res.appendHeader(\n 'Access-Control-Expose-Headers',\n 'WWW-Authenticate',\n )\n }\n\n if (err instanceof OAuthError) {\n throw new XRPCError(err.status, err.error_description, err.error)\n }\n\n throw err\n })\n\n if (!isDidString(did)) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n\n await this.verifyStatus(did, verifyStatusOptions)\n\n const permissions = new ScopePermissionsTransition(scope?.split(' '))\n\n // Should never happen\n if (!permissions.scopes.has('atproto')) {\n throw new InvalidRequestError(\n 'OAuth token does not have \"atproto\" scope',\n 'InvalidToken',\n )\n }\n\n await authorize(permissions, ctx)\n\n return {\n credentials: {\n type: 'oauth',\n did,\n permissions,\n },\n }\n }\n }\n\n protected async verifyStatus(\n did: DidString,\n options: VerifiedOptions,\n ): Promise<void> {\n if (options.checkDeactivated || options.checkTakedown) {\n await this.findAccount(did, options)\n }\n }\n\n /**\n * Finds an account by its handle or DID, returning possibly deactivated or\n * taken down accounts (unless `options.checkDeactivated` or\n * `options.checkTakedown` are set to true, respectively).\n */\n public async findAccount(\n handleOrDid: AtIdentifierString,\n options: VerifiedOptions,\n ): Promise<ActorAccount> {\n const account = await this.accountManager.getAccount(handleOrDid, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n // will be turned into ExpiredToken for the client if proxied by entryway\n throw new ForbiddenError('Account not found', 'AccountNotFound')\n }\n if (options.checkTakedown && softDeleted(account)) {\n throw new AuthRequiredError(\n 'Account has been taken down',\n 'AccountTakedown',\n )\n }\n if (options.checkDeactivated && account.deactivatedAt) {\n throw new AuthRequiredError(\n 'Account is deactivated',\n 'AccountDeactivated',\n )\n }\n return account\n }\n\n /**\n * Wraps {@link jose.jwtVerify} into a function that also validates the token\n * payload's type and wraps errors into {@link InvalidRequestError}.\n */\n protected async verifyBearerJwt<S extends AuthScope = AuthScope>(\n req: IncomingMessage,\n { scopes, ...options }: VerifyBearerJwtOptions<S>,\n ): Promise<VerifyBearerJwtResult<S>> {\n const token = bearerTokenFromReq(req)\n if (!token) {\n throw new AuthRequiredError(undefined, 'AuthMissing')\n }\n\n const { payload } = await jose\n .jwtVerify(token, this._jwtKey, options)\n .catch((cause) => {\n if (cause instanceof jose.errors.JWTExpired) {\n throw new InvalidRequestError('Token has expired', 'ExpiredToken', {\n cause,\n })\n } else {\n throw new InvalidRequestError(\n 'Token could not be verified',\n 'InvalidToken',\n { cause },\n )\n }\n })\n\n const { sub, aud, scope, lxm, cnf, jti } = payload\n\n if (typeof lxm !== 'undefined') {\n // Service auth tokens should never make it to here. But since service\n // auth tokens do not have a \"typ\" header, the \"typ\" check above will not\n // catch them. This check here is mainly to protect against the\n // hypothetical case in which a PDS would issue service auth tokens using\n // its private key.\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof cnf !== 'undefined') {\n // Proof-of-Possession (PoP) tokens are not allowed here\n // https://www.rfc-editor.org/rfc/rfc7800.html\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof sub !== 'string' || !isDidString(sub)) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof aud !== 'string' || !aud.startsWith('did:')) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof jti !== 'string' && typeof jti !== 'undefined') {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (!isAuthScope(scope) || !scopes.includes(scope as any)) {\n throw new InvalidRequestError('Bad token scope', 'InvalidToken')\n }\n\n return { sub, aud, jti, scope: scope as S }\n }\n\n protected async verifyServiceJwt(\n req: IncomingMessage,\n opts?: { iss?: string[] },\n ) {\n const jwtStr = bearerTokenFromReq(req)\n if (!jwtStr) {\n throw new AuthRequiredError('missing jwt', 'MissingJwt')\n }\n\n const nsid = parseReqNsid(req)\n const payload = await verifyServiceJwt(\n jwtStr,\n null,\n nsid,\n async (iss, forceRefresh) => {\n if (opts?.iss && !opts.iss.includes(iss)) {\n throw new AuthRequiredError('Untrusted issuer', 'UntrustedIss')\n }\n const [did, serviceId] = iss.split('#')\n const keyId =\n serviceId === 'atproto_labeler' ? 'atproto_label' : 'atproto'\n const didDoc = await this.idResolver.did.resolve(did, forceRefresh)\n if (!didDoc) {\n throw new AuthRequiredError('could not resolve iss did')\n }\n const parsedKey = getVerificationMaterial(didDoc, keyId)\n if (!parsedKey) {\n throw new AuthRequiredError('missing or bad key in did doc')\n }\n const didKey = getDidKeyFromMultibase(parsedKey)\n if (!didKey) {\n throw new AuthRequiredError('missing or bad key in did doc')\n }\n return didKey\n },\n )\n if (\n payload.aud !== this.dids.pds &&\n (!this.dids.entryway || payload.aud !== this.dids.entryway)\n ) {\n throw new AuthRequiredError(\n 'jwt audience does not match service did',\n 'BadJwtAudience',\n )\n }\n return payload\n }\n}\n\n// HELPERS\n// ---------\n\nexport function isUserOrAdmin(\n auth: AccessOutput | OAuthOutput | AdminTokenOutput | UnauthenticatedOutput,\n did: string,\n): boolean {\n if (!auth.credentials) {\n return false\n } else if (auth.credentials.type === 'admin_token') {\n return true\n } else {\n return auth.credentials.did === did\n }\n}\n\nenum AuthType {\n BASIC = 'Basic',\n BEARER = 'Bearer',\n DPOP = 'DPoP',\n}\n\nconst parseAuthorizationHeader = (\n req: IncomingMessage,\n): [type: null] | [type: AuthType, token: string] => {\n const authorization = req.headers['authorization']\n if (!authorization) return [null]\n\n const result = authorization.split(' ')\n if (result.length !== 2) {\n throw new InvalidRequestError(\n 'Malformed authorization header',\n 'InvalidToken',\n )\n }\n\n // authorization type is case-insensitive\n const authType = result[0].toUpperCase()\n\n const type = Object.hasOwn(AuthType, authType) ? AuthType[authType] : null\n if (type) return [type, result[1]]\n\n throw new InvalidRequestError(\n `Unsupported authorization type: ${result[0]}`,\n 'InvalidToken',\n )\n}\n\n/**\n * @note Not all service auth tokens are guaranteed to have \"lxm\" claim, so this\n * function should not be used to verify service auth tokens. It is only used to\n * check if a token is definitely a service auth token.\n */\nconst isDefinitelyServiceAuth = (req: IncomingMessage): boolean => {\n const token = bearerTokenFromReq(req)\n if (!token) return false\n const payload = jose.decodeJwt(token)\n return payload['lxm'] != null\n}\n\nconst extractAuthType = (req: IncomingMessage): AuthType | null => {\n const [type] = parseAuthorizationHeader(req)\n return type\n}\n\nexport const bearerTokenFromReq = (req: IncomingMessage) => {\n const [type, token] = parseAuthorizationHeader(req)\n return type === AuthType.BEARER ? token : null\n}\n\nconst parseBasicAuth = (\n req: IncomingMessage,\n): { username: string; password: string } | null => {\n try {\n const [type, b64] = parseAuthorizationHeader(req)\n if (type !== AuthType.BASIC) return null\n const decoded = Buffer.from(b64, 'base64').toString('utf8')\n // We must not use split(':') because the password can contain colons\n const colon = decoded.indexOf(':')\n if (colon === -1) return null\n const username = decoded.slice(0, colon)\n const password = decoded.slice(colon + 1)\n return { username, password }\n } catch (err) {\n return null\n }\n}\n\nexport const createSecretKeyObject = (secret: string): KeyObject => {\n return createSecretKey(Buffer.from(secret))\n}\n\nconst keyEncoder = new KeyEncoder('secp256k1')\nexport const createPublicKeyObject = (publicKeyHex: string): KeyObject => {\n const key = keyEncoder.encodePublic(publicKeyHex, 'raw', 'pem')\n return createPublicKey({ format: 'pem', key })\n}\n\nfunction setAuthHeaders(res: ServerResponse) {\n res.setHeader('Cache-Control', 'private')\n appendVary(res, 'Authorization')\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auth-verifier.js","sourceRoot":"","sources":["../src/auth-verifier.ts"],"names":[],"mappings":"AAAA,OA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AAC,CAAA;AAED,SAAS,cAAc,CAAC,GAAmB;IACzC,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;IACzC,UAAU,CAAC,GAAG,EAAE,eAAe,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import { type KeyObject, createPublicKey, createSecretKey } from 'node:crypto'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport * as jose from 'jose'\nimport KeyEncoderModule from 'key-encoder'\nimport { getVerificationMaterial } from '@atproto/common'\nimport { type IdResolver, getDidKeyFromMultibase } from '@atproto/identity'\nimport {\n type AtIdentifierString,\n type DidString,\n isDidString,\n} from '@atproto/lex'\nimport {\n OAuthError,\n WWWAuthenticateError,\n} from '@atproto/oauth-provider/errors'\nimport type {\n OAuthVerifier,\n VerifyTokenPayloadOptions,\n} from '@atproto/oauth-provider/verifier'\nimport {\n type ScopePermissions,\n ScopePermissionsTransition,\n} from '@atproto/oauth-scopes'\nimport {\n AuthRequiredError,\n type Awaitable,\n ForbiddenError,\n InvalidRequestError,\n type MethodAuthContext,\n type MethodAuthVerifier,\n type Params,\n XRPCError,\n parseReqNsid,\n verifyJwt as verifyServiceJwt,\n} from '@atproto/xrpc-server'\nimport type { AccountManager } from './account-manager/account-manager.js'\nimport type { ActorAccount } from './account-manager/helpers/account.js'\nimport type {\n AccessOutput,\n AdminTokenOutput,\n ModServiceOutput,\n OAuthOutput,\n RefreshOutput,\n UnauthenticatedOutput,\n UserServiceAuthOutput,\n} from './auth-output.js'\nimport { ACCESS_STANDARD, AuthScope, isAuthScope } from './auth-scope.js'\nimport { softDeleted } from './db/index.js'\nimport { appendVary } from './util/http.js'\nimport type { WithRequired } from './util/types.js'\n\n// key-encoder is CJS with exports.default; Node ESM interop wraps it as { default: Class }\nconst KeyEncoder = ((m) => m.default ?? m)(KeyEncoderModule)\n\nexport type VerifiedOptions = {\n checkTakedown?: boolean\n checkDeactivated?: boolean\n}\n\nexport type ScopedOptions<S extends AuthScope = AuthScope> = {\n scopes?: readonly S[]\n}\n\nexport type ExtraScopedOptions<S extends AuthScope = AuthScope> = {\n additional?: readonly S[]\n}\n\nexport type AuthorizedOptions<P extends Params = Params> = {\n authorize: (\n permissions: ScopePermissions,\n ctx: MethodAuthContext<P>,\n ) => Awaitable<void>\n}\n\nexport type AuthVerifierOpts = {\n publicUrl: string\n jwtKey: KeyObject\n adminPass: string\n dids: {\n pds: string\n entryway?: string\n modService?: string\n }\n}\n\nexport type VerifyBearerJwtOptions<S extends AuthScope = AuthScope> =\n WithRequired<\n Omit<jose.JWTVerifyOptions, 'scopes'> & {\n scopes: readonly S[]\n },\n 'audience' | 'typ'\n >\n\nexport type VerifyBearerJwtResult<S extends AuthScope = AuthScope> = {\n sub: DidString\n aud: string\n jti: string | undefined\n scope: S\n}\n\nexport class AuthVerifier {\n private _publicUrl: string\n private _jwtKey: KeyObject\n private _adminPass: string\n public dids: AuthVerifierOpts['dids']\n\n constructor(\n public accountManager: AccountManager,\n public idResolver: IdResolver,\n public oauthVerifier: OAuthVerifier,\n opts: AuthVerifierOpts,\n ) {\n this._publicUrl = opts.publicUrl\n this._jwtKey = opts.jwtKey\n this._adminPass = opts.adminPass\n this.dids = opts.dids\n }\n\n // verifiers (arrow fns to preserve scope)\n\n public unauthenticated: MethodAuthVerifier<UnauthenticatedOutput> = (ctx) => {\n setAuthHeaders(ctx.res)\n\n // @NOTE this auth method is typically used as fallback when no other auth\n // method is applicable. This means that the presence of an \"authorization\"\n // header means that that header is invalid (as it did not match any of the\n // other auth methods).\n if (ctx.req.headers['authorization']) {\n throw new AuthRequiredError('Invalid authorization header')\n }\n\n return {\n credentials: null,\n }\n }\n\n public adminToken: MethodAuthVerifier<AdminTokenOutput> = async (ctx) => {\n setAuthHeaders(ctx.res)\n const parsed = parseBasicAuth(ctx.req)\n if (!parsed) {\n throw new AuthRequiredError()\n }\n const { username, password } = parsed\n if (username !== 'admin' || password !== this._adminPass) {\n throw new AuthRequiredError()\n }\n\n return { credentials: { type: 'admin_token' } }\n }\n\n public modService: MethodAuthVerifier<ModServiceOutput> = async (ctx) => {\n setAuthHeaders(ctx.res)\n if (!this.dids.modService) {\n throw new AuthRequiredError('Untrusted issuer', 'UntrustedIss')\n }\n const payload = await this.verifyServiceJwt(ctx.req, {\n iss: [this.dids.modService, `${this.dids.modService}#atproto_labeler`],\n })\n return {\n credentials: {\n type: 'mod_service',\n did: payload.iss,\n },\n }\n }\n\n public moderator: MethodAuthVerifier<AdminTokenOutput | ModServiceOutput> =\n async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER) {\n return this.modService(ctx)\n } else {\n return this.adminToken(ctx)\n }\n }\n\n protected access<S extends AuthScope>(\n options: VerifiedOptions & Required<ScopedOptions<S>>,\n ): MethodAuthVerifier<AccessOutput<S>> {\n const { scopes, ...statusOptions } = options\n\n const verifyJwtOptions: VerifyBearerJwtOptions<S> = {\n audience: this.dids.pds,\n typ: 'at+jwt',\n scopes:\n // @NOTE We can reject taken down credentials based on the scope if\n // \"checkTakedown\" is set.\n statusOptions.checkTakedown && scopes.includes(AuthScope.Takendown as S)\n ? scopes.filter((s) => s !== AuthScope.Takendown)\n : scopes,\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const { sub: did, scope } = await this.verifyBearerJwt(\n ctx.req,\n verifyJwtOptions,\n )\n\n await this.verifyStatus(did, statusOptions)\n\n return {\n credentials: { type: 'access', did, scope },\n }\n }\n }\n\n public refresh(options?: {\n allowExpired?: boolean\n }): MethodAuthVerifier<RefreshOutput> {\n const verifyOptions: VerifyBearerJwtOptions<AuthScope.Refresh> = {\n clockTolerance: options?.allowExpired ? Infinity : undefined,\n typ: 'refresh+jwt',\n // when using entryway, proxying refresh credentials\n audience: this.dids.entryway ? this.dids.entryway : this.dids.pds,\n scopes: [AuthScope.Refresh],\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const result = await this.verifyBearerJwt(ctx.req, verifyOptions)\n\n const tokenId = result.jti\n if (!tokenId) {\n throw new AuthRequiredError(\n 'Unexpected missing refresh token id',\n 'MissingTokenId',\n )\n }\n\n return {\n credentials: {\n type: 'refresh',\n did: result.sub,\n scope: result.scope,\n tokenId,\n },\n }\n }\n }\n\n public authorization<P extends Params>({\n scopes = ACCESS_STANDARD,\n additional = [],\n ...options\n }: VerifiedOptions &\n ScopedOptions &\n ExtraScopedOptions &\n AuthorizedOptions<P>): MethodAuthVerifier<AccessOutput | OAuthOutput, P> {\n const access = this.access({\n ...options,\n scopes: [...scopes, ...additional],\n })\n const oauth = this.oauth(options)\n\n return async (ctx) => {\n const type = extractAuthType(ctx.req)\n\n if (type === AuthType.BEARER) {\n return access(ctx)\n }\n\n if (type === AuthType.DPOP) {\n return oauth(ctx)\n }\n\n // Auth headers are set through the access and oauth methods so we only\n // need to set them here if we reach this point\n setAuthHeaders(ctx.res)\n\n if (type !== null) {\n throw new InvalidRequestError(\n 'Unexpected authorization type',\n 'InvalidToken',\n )\n }\n\n throw new AuthRequiredError(undefined, 'AuthMissing')\n }\n }\n\n public authorizationOrAdminTokenOptional<P extends Params>(\n opts: VerifiedOptions & ExtraScopedOptions & AuthorizedOptions<P>,\n ): MethodAuthVerifier<\n OAuthOutput | AccessOutput | AdminTokenOutput | UnauthenticatedOutput,\n P\n > {\n const authorization = this.authorization(opts)\n return async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER || type === AuthType.DPOP) {\n return authorization(ctx)\n } else if (type === AuthType.BASIC) {\n return this.adminToken(ctx)\n } else {\n return this.unauthenticated(ctx)\n }\n }\n }\n\n public userServiceAuth: MethodAuthVerifier<UserServiceAuthOutput> = async (\n ctx,\n ) => {\n setAuthHeaders(ctx.res)\n const payload = await this.verifyServiceJwt(ctx.req)\n return {\n credentials: {\n type: 'user_service_auth',\n did: payload.iss,\n },\n }\n }\n\n public userServiceAuthOptional: MethodAuthVerifier<\n UserServiceAuthOutput | UnauthenticatedOutput\n > = async (ctx) => {\n const type = extractAuthType(ctx.req)\n if (type === AuthType.BEARER) {\n return await this.userServiceAuth(ctx)\n } else {\n return this.unauthenticated(ctx)\n }\n }\n\n public authorizationOrUserServiceAuth<P extends Params>(\n options: VerifiedOptions &\n ScopedOptions &\n ExtraScopedOptions &\n AuthorizedOptions<P>,\n ): MethodAuthVerifier<UserServiceAuthOutput | OAuthOutput | AccessOutput, P> {\n const authorizationVerifier = this.authorization(options)\n return async (ctx) => {\n if (isDefinitelyServiceAuth(ctx.req)) {\n return this.userServiceAuth(ctx)\n } else {\n return authorizationVerifier(ctx)\n }\n }\n }\n\n protected oauth<P extends Params>({\n authorize,\n ...verifyStatusOptions\n }: VerifiedOptions & AuthorizedOptions<P>): MethodAuthVerifier<\n OAuthOutput,\n P\n > {\n const verifyTokenOptions: VerifyTokenPayloadOptions = {\n audience: [this.dids.pds],\n scope: ['atproto'],\n }\n\n return async (ctx) => {\n setAuthHeaders(ctx.res)\n\n const { req, res } = ctx\n\n // https://datatracker.ietf.org/doc/html/rfc9449#section-8.2\n const dpopNonce = this.oauthVerifier.nextDpopNonce()\n if (dpopNonce) {\n res.setHeader('DPoP-Nonce', dpopNonce)\n res.appendHeader('Access-Control-Expose-Headers', 'DPoP-Nonce')\n }\n\n const originalUrl = req.originalUrl || req.url || '/'\n const url = new URL(originalUrl, this._publicUrl)\n\n const { scope, sub: did } = await this.oauthVerifier\n .authenticateRequest(\n req.method || 'GET',\n url,\n req.headers,\n verifyTokenOptions,\n )\n .catch((err) => {\n // Make sure to include any WWW-Authenticate header in the response\n // (particularly useful for DPoP's \"use_dpop_nonce\" error)\n if (err instanceof WWWAuthenticateError) {\n res.setHeader('WWW-Authenticate', err.wwwAuthenticateHeader)\n res.appendHeader(\n 'Access-Control-Expose-Headers',\n 'WWW-Authenticate',\n )\n }\n\n if (err instanceof OAuthError) {\n throw new XRPCError(err.status, err.error_description, err.error)\n }\n\n throw err\n })\n\n if (!isDidString(did)) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n\n await this.verifyStatus(did, verifyStatusOptions)\n\n const permissions = new ScopePermissionsTransition(scope?.split(' '))\n\n // Should never happen\n if (!permissions.scopes.has('atproto')) {\n throw new InvalidRequestError(\n 'OAuth token does not have \"atproto\" scope',\n 'InvalidToken',\n )\n }\n\n await authorize(permissions, ctx)\n\n return {\n credentials: {\n type: 'oauth',\n did,\n permissions,\n },\n }\n }\n }\n\n protected async verifyStatus(\n did: DidString,\n options: VerifiedOptions,\n ): Promise<void> {\n if (options.checkDeactivated || options.checkTakedown) {\n await this.findAccount(did, options)\n }\n }\n\n /**\n * Finds an account by its handle or DID, returning possibly deactivated or\n * taken down accounts (unless `options.checkDeactivated` or\n * `options.checkTakedown` are set to true, respectively).\n */\n public async findAccount(\n handleOrDid: AtIdentifierString,\n options: VerifiedOptions,\n ): Promise<ActorAccount> {\n const account = await this.accountManager.getAccount(handleOrDid, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n // will be turned into ExpiredToken for the client if proxied by entryway\n throw new ForbiddenError('Account not found', 'AccountNotFound')\n }\n if (options.checkTakedown && softDeleted(account)) {\n throw new AuthRequiredError(\n 'Account has been taken down',\n 'AccountTakedown',\n )\n }\n if (options.checkDeactivated && account.deactivatedAt) {\n throw new AuthRequiredError(\n 'Account is deactivated',\n 'AccountDeactivated',\n )\n }\n return account\n }\n\n /**\n * Wraps {@link jose.jwtVerify} into a function that also validates the token\n * payload's type and wraps errors into {@link InvalidRequestError}.\n */\n protected async verifyBearerJwt<S extends AuthScope = AuthScope>(\n req: IncomingMessage,\n { scopes, ...options }: VerifyBearerJwtOptions<S>,\n ): Promise<VerifyBearerJwtResult<S>> {\n const token = bearerTokenFromReq(req)\n if (!token) {\n throw new AuthRequiredError(undefined, 'AuthMissing')\n }\n\n const { payload } = await jose\n .jwtVerify(token, this._jwtKey, options)\n .catch((cause) => {\n if (cause instanceof jose.errors.JWTExpired) {\n throw new InvalidRequestError('Token has expired', 'ExpiredToken', {\n cause,\n })\n } else {\n throw new InvalidRequestError(\n 'Token could not be verified',\n 'InvalidToken',\n { cause },\n )\n }\n })\n\n const { sub, aud, scope, lxm, cnf, jti } = payload\n\n if (typeof lxm !== 'undefined') {\n // Service auth tokens should never make it to here. But since service\n // auth tokens do not have a \"typ\" header, the \"typ\" check above will not\n // catch them. This check here is mainly to protect against the\n // hypothetical case in which a PDS would issue service auth tokens using\n // its private key.\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof cnf !== 'undefined') {\n // Proof-of-Possession (PoP) tokens are not allowed here\n // https://www.rfc-editor.org/rfc/rfc7800.html\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof sub !== 'string' || !isDidString(sub)) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof aud !== 'string' || !aud.startsWith('did:')) {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (typeof jti !== 'string' && typeof jti !== 'undefined') {\n throw new InvalidRequestError('Malformed token', 'InvalidToken')\n }\n if (!isAuthScope(scope) || !scopes.includes(scope as any)) {\n throw new InvalidRequestError('Bad token scope', 'InvalidToken')\n }\n\n return { sub, aud, jti, scope: scope as S }\n }\n\n protected async verifyServiceJwt(\n req: IncomingMessage,\n opts?: { iss?: string[] },\n ) {\n const jwtStr = bearerTokenFromReq(req)\n if (!jwtStr) {\n throw new AuthRequiredError('missing jwt', 'MissingJwt')\n }\n\n const nsid = parseReqNsid(req)\n const payload = await verifyServiceJwt(\n jwtStr,\n null,\n nsid,\n async (iss, forceRefresh) => {\n if (opts?.iss && !opts.iss.includes(iss)) {\n throw new AuthRequiredError('Untrusted issuer', 'UntrustedIss')\n }\n const [did, serviceId] = iss.split('#')\n const keyId =\n serviceId === 'atproto_labeler' ? 'atproto_label' : 'atproto'\n const didDoc = await this.idResolver.did.resolve(did, forceRefresh)\n if (!didDoc) {\n throw new AuthRequiredError('could not resolve iss did')\n }\n const parsedKey = getVerificationMaterial(didDoc, keyId)\n if (!parsedKey) {\n throw new AuthRequiredError('missing or bad key in did doc')\n }\n const didKey = getDidKeyFromMultibase(parsedKey)\n if (!didKey) {\n throw new AuthRequiredError('missing or bad key in did doc')\n }\n return didKey\n },\n )\n if (\n payload.aud !== this.dids.pds &&\n (!this.dids.entryway || payload.aud !== this.dids.entryway)\n ) {\n throw new AuthRequiredError(\n 'jwt audience does not match service did',\n 'BadJwtAudience',\n )\n }\n return payload\n }\n}\n\n// HELPERS\n// ---------\n\nexport function isUserOrAdmin(\n auth: AccessOutput | OAuthOutput | AdminTokenOutput | UnauthenticatedOutput,\n did: string,\n): boolean {\n if (!auth.credentials) {\n return false\n } else if (auth.credentials.type === 'admin_token') {\n return true\n } else {\n return auth.credentials.did === did\n }\n}\n\nenum AuthType {\n BASIC = 'Basic',\n BEARER = 'Bearer',\n DPOP = 'DPoP',\n}\n\nconst parseAuthorizationHeader = (\n req: IncomingMessage,\n): [type: null] | [type: AuthType, token: string] => {\n const authorization = req.headers['authorization']\n if (!authorization) return [null]\n\n const result = authorization.split(' ')\n if (result.length !== 2) {\n throw new InvalidRequestError(\n 'Malformed authorization header',\n 'InvalidToken',\n )\n }\n\n // authorization type is case-insensitive\n const authType = result[0].toUpperCase()\n\n const type = Object.hasOwn(AuthType, authType) ? AuthType[authType] : null\n if (type) return [type, result[1]]\n\n throw new InvalidRequestError(\n `Unsupported authorization type: ${result[0]}`,\n 'InvalidToken',\n )\n}\n\n/**\n * @note Not all service auth tokens are guaranteed to have \"lxm\" claim, so this\n * function should not be used to verify service auth tokens. It is only used to\n * check if a token is definitely a service auth token.\n */\nconst isDefinitelyServiceAuth = (req: IncomingMessage): boolean => {\n const token = bearerTokenFromReq(req)\n if (!token) return false\n const payload = jose.decodeJwt(token)\n return payload['lxm'] != null\n}\n\nconst extractAuthType = (req: IncomingMessage): AuthType | null => {\n const [type] = parseAuthorizationHeader(req)\n return type\n}\n\nexport const bearerTokenFromReq = (req: IncomingMessage) => {\n const [type, token] = parseAuthorizationHeader(req)\n return type === AuthType.BEARER ? token : null\n}\n\nconst parseBasicAuth = (\n req: IncomingMessage,\n): { username: string; password: string } | null => {\n try {\n const [type, b64] = parseAuthorizationHeader(req)\n if (type !== AuthType.BASIC) return null\n const decoded = Buffer.from(b64, 'base64').toString('utf8')\n // We must not use split(':') because the password can contain colons\n const colon = decoded.indexOf(':')\n if (colon === -1) return null\n const username = decoded.slice(0, colon)\n const password = decoded.slice(colon + 1)\n return { username, password }\n } catch (err) {\n return null\n }\n}\n\nexport const createSecretKeyObject = (secret: string): KeyObject => {\n return createSecretKey(Buffer.from(secret))\n}\n\nconst keyEncoder = new KeyEncoder('secp256k1')\nexport const createPublicKeyObject = (publicKeyHex: string): KeyObject => {\n const key = keyEncoder.encodePublic(publicKeyHex, 'raw', 'pem')\n return createPublicKey({ format: 'pem', key })\n}\n\nfunction setAuthHeaders(res: ServerResponse) {\n res.setHeader('Cache-Control', 'private')\n appendVary(res, 'Authorization')\n}\n"]}
|
package/dist/basic-routes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-routes.d.ts","sourceRoot":"","sources":["../src/basic-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"basic-routes.d.ts","sourceRoot":"","sources":["../src/basic-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,eAAO,MAAM,YAAY,QAAS,UAAU,KAAG,MA+C9C,CAAA"}
|
package/dist/basic-routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-routes.js","sourceRoot":"","sources":["../src/basic-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;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nimport { sql } from 'kysely'\nimport { AppContext } from './context.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n router.get('/', function (req, res) {\n res.type('text/plain')\n res.send(`\n __ __\n /\\\\ \\\\__ /\\\\ \\\\__\n __ \\\\ \\\\ ,_\\\\ _____ _ __ ___\\\\ \\\\ ,_\\\\ ___\n /'__'\\\\ \\\\ \\\\ \\\\/ /\\\\ '__'\\\\/\\\\''__\\\\/ __'\\\\ \\\\ \\\\/ / __'\\\\\n /\\\\ \\\\L\\\\.\\\\_\\\\ \\\\ \\\\_\\\\ \\\\ \\\\L\\\\ \\\\ \\\\ \\\\//\\\\ \\\\L\\\\ \\\\ \\\\ \\\\_/\\\\ \\\\L\\\\ \\\\\n \\\\ \\\\__/.\\\\_\\\\\\\\ \\\\__\\\\\\\\ \\\\ ,__/\\\\ \\\\_\\\\\\\\ \\\\____/\\\\ \\\\__\\\\ \\\\____/\n \\\\/__/\\\\/_/ \\\\/__/ \\\\ \\\\ \\\\/ \\\\/_/ \\\\/___/ \\\\/__/\\\\/___/\n \\\\ \\\\_\\\\\n \\\\/_/\n\n\nThis is an AT Protocol Personal Data Server (aka, an atproto PDS)\n\nMost API routes are under /xrpc/\n\n Code: https://github.com/bluesky-social/atproto\n Self-Host: https://github.com/bluesky-social/pds\n Protocol: https://atproto.com\n`)\n })\n\n router.get('/robots.txt', function (req, res) {\n res.type('text/plain')\n res.send(\n '# Hello!\\n\\n# Crawling the public API is allowed\\nUser-agent: *\\nAllow: /',\n )\n })\n\n router.get('/xrpc/_health', async function (req, res) {\n const { version } = ctx.cfg.service\n try {\n await sql`select 1`.execute(ctx.accountManager.db.db)\n } catch (err) {\n req.log.error({ err }, 'failed health check')\n res.status(503).send({ version, error: 'Service Unavailable' })\n return\n }\n res.send({ version })\n })\n\n return router\n}\n"]}
|
|
1
|
+
{"version":3,"file":"basic-routes.js","sourceRoot":"","sources":["../src/basic-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MA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AAA","sourcesContent":["import { Router } from 'express'\nimport { sql } from 'kysely'\nimport type { AppContext } from './context.js'\n\nexport const createRouter = (ctx: AppContext): Router => {\n const router = Router()\n\n router.get('/', function (req, res) {\n res.type('text/plain')\n res.send(`\n __ __\n /\\\\ \\\\__ /\\\\ \\\\__\n __ \\\\ \\\\ ,_\\\\ _____ _ __ ___\\\\ \\\\ ,_\\\\ ___\n /'__'\\\\ \\\\ \\\\ \\\\/ /\\\\ '__'\\\\/\\\\''__\\\\/ __'\\\\ \\\\ \\\\/ / __'\\\\\n /\\\\ \\\\L\\\\.\\\\_\\\\ \\\\ \\\\_\\\\ \\\\ \\\\L\\\\ \\\\ \\\\ \\\\//\\\\ \\\\L\\\\ \\\\ \\\\ \\\\_/\\\\ \\\\L\\\\ \\\\\n \\\\ \\\\__/.\\\\_\\\\\\\\ \\\\__\\\\\\\\ \\\\ ,__/\\\\ \\\\_\\\\\\\\ \\\\____/\\\\ \\\\__\\\\ \\\\____/\n \\\\/__/\\\\/_/ \\\\/__/ \\\\ \\\\ \\\\/ \\\\/_/ \\\\/___/ \\\\/__/\\\\/___/\n \\\\ \\\\_\\\\\n \\\\/_/\n\n\nThis is an AT Protocol Personal Data Server (aka, an atproto PDS)\n\nMost API routes are under /xrpc/\n\n Code: https://github.com/bluesky-social/atproto\n Self-Host: https://github.com/bluesky-social/pds\n Protocol: https://atproto.com\n`)\n })\n\n router.get('/robots.txt', function (req, res) {\n res.type('text/plain')\n res.send(\n '# Hello!\\n\\n# Crawling the public API is allowed\\nUser-agent: *\\nAllow: /',\n )\n })\n\n router.get('/xrpc/_health', async function (req, res) {\n const { version } = ctx.cfg.service\n try {\n await sql`select 1`.execute(ctx.accountManager.db.db)\n } catch (err) {\n req.log.error({ err }, 'failed health check')\n res.status(503).send({ version, error: 'Service Unavailable' })\n return\n }\n res.send({ version })\n })\n\n return router\n}\n"]}
|
package/dist/config/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DidString } from '@atproto/syntax';
|
|
3
|
-
import { ServerEnvironment } from './env.js';
|
|
1
|
+
import type { BrandingConfig, HcaptchaConfig } from '@atproto/oauth-provider/provider';
|
|
2
|
+
import { type DidString } from '@atproto/syntax';
|
|
3
|
+
import type { ServerEnvironment } from './env.js';
|
|
4
4
|
export type { BrandingConfig };
|
|
5
5
|
export declare const envToCfg: (env: ServerEnvironment) => ServerConfig;
|
|
6
6
|
export type ServerConfig = {
|
|
@@ -58,6 +58,7 @@ export type S3BlobstoreConfig = {
|
|
|
58
58
|
endpoint?: string;
|
|
59
59
|
forcePathStyle?: boolean;
|
|
60
60
|
uploadTimeoutMs?: number;
|
|
61
|
+
requestTimeoutMs?: number;
|
|
61
62
|
credentials?: {
|
|
62
63
|
accessKeyId: string;
|
|
63
64
|
secretAccessKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,SAAS,EAA8B,MAAM,iBAAiB,CAAA;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEjD,YAAY,EAAE,cAAc,EAAE,CAAA;AAK9B,eAAO,MAAM,QAAQ,QAAS,iBAAiB,KAAG,YA2WjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,aAAa,CAAA;IACtB,EAAE,EAAE,cAAc,CAAA;IAClB,UAAU,EAAE,gBAAgB,CAAA;IAC5B,SAAS,EAAE,iBAAiB,GAAG,mBAAmB,CAAA;IAClD,QAAQ,EAAE,cAAc,CAAA;IACxB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IA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;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,CAAA;AAEtB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA"}
|
package/dist/config/config.js
CHANGED
|
@@ -52,6 +52,7 @@ export const envToCfg = (env) => {
|
|
|
52
52
|
provider: 's3',
|
|
53
53
|
bucket: env.blobstoreS3Bucket,
|
|
54
54
|
uploadTimeoutMs: env.blobstoreS3UploadTimeoutMs || 20000,
|
|
55
|
+
requestTimeoutMs: env.blobstoreS3RequestTimeoutMs,
|
|
55
56
|
region: env.blobstoreS3Region,
|
|
56
57
|
endpoint: env.blobstoreS3Endpoint,
|
|
57
58
|
forcePathStyle: env.blobstoreS3ForcePathStyle,
|