Skip to content

feat: update revenue endpoint auth#5

Open
DmitryAnansky wants to merge 1 commit into
mainfrom
feat/update-revenue-endpoint-auth
Open

feat: update revenue endpoint auth#5
DmitryAnansky wants to merge 1 commit into
mainfrom
feat/update-revenue-endpoint-auth

Conversation

@DmitryAnansky
Copy link
Copy Markdown
Collaborator

Updated Cafe API revenue endpoint with double auth type security.
The reason for that - is the easier demonstration.
So now both OAuth2 and APIKey auth will work for revenue endpoint.
Also introduced new revenue:read scope.

@DmitryAnansky DmitryAnansky requested a review from a team June 3, 2026 15:28
@DmitryAnansky DmitryAnansky self-assigned this Jun 3, 2026
Copy link
Copy Markdown

@redocly redocly Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cafe AI Review: 🟢 Completed

Reunite Bot has reviewed your changes and found 2 potential issue(s).

Note

Low Risk

This PR poses minimal risk as the changes are isolated to OpenAPI schema definitions and a UI configuration hook. Adding a new scope and alternative authentication method for a single endpoint is non-disruptive and maintains backward compatibility.

Overview

Updates the Cafe API documentation to support dual authentication for the /revenue endpoint, adding OAuth2 alongside the existing API Key auth. Introduces a new revenue:read scope across OAuth2 security definitions, schema components (OAuth2Client, RegisterClientObject), and examples. Additionally, updates the internal theme replay configuration to recognize the newly added scope.

- menu:write
- orders:read
- orders:write
- revenue:read
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description still lists "(menu:read, menu:write, orders:read, orders:write)" as all available scopes. It should be updated to include the newly added "revenue:read" scope for consistency with the schema.

security:
- ApiKey: []
- OAuth2:
- revenue:read
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ApiKey remains an alternative to OAuth2 for the sensitive /revenue endpoint. Since ApiKey lacks scope restrictions, it could allow over-privileged access, bypassing the granular revenue:read scope intended for this financial data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant