feat: Add publishable key scopes middleware (#7301)

**What**

Add pub key + sales channel middlewares to the store carts API
- Assign sales channel associated with pub key, if sales channel is not passed in request
  - Throw if pub key has multiple associated sales channels
- Throw if sales channel ID in payload is not associated with publishable API key in header
This commit is contained in:
Oli Juhl
2024-05-13 18:17:52 +02:00
committed by GitHub
parent 6c94d0205c
commit 5b26f5f2cf
6 changed files with 264 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
export * from "./link-sales-channels-to-publishable-key"
export * from "./create-api-keys"
export * from "./delete-api-keys"
export * from "./link-sales-channels-to-publishable-key"
export * from "./revoke-api-keys"
export * from "./update-api-keys"
export * from "./validate-sales-channel-exists"

View File

@@ -1,5 +1,6 @@
export * from "./create-api-keys"
export * from "./delete-api-keys"
export * from "./update-api-keys"
export * from "./revoke-api-keys"
export * from "./link-sales-channels-to-publishable-key"
export * from "./revoke-api-keys"
export * from "./update-api-keys"