Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(graph-gateway): query settings as a request extension #581

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Feb 7, 2024

Use HTTP request extensions to pass request-bound settings, in this case, the auth query settings.

  • Decouple QuerySettings from the auth module. Moved to its parent module, client_query.
  • Extract the query settings at the parse_auth_token() step.
  • Pass the query settings to the handler via request extensions if the auth schema specifies them.
  • Check if the subscription exists during subscriptions::parse_auth_token() step. If no subscriptions associated with the bearer token exist, bailout at the require_auth middleware.

@LNSD LNSD requested a review from Theodus February 7, 2024 11:01
@LNSD LNSD self-assigned this Feb 7, 2024
@LNSD LNSD force-pushed the lnsd/query-settings-ext branch from 4a60f50 to b4dbaf6 Compare February 7, 2024 14:54
Copy link
Member

@Theodus Theodus left a comment

Choose a reason for hiding this comment

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

LGTM

@LNSD LNSD merged commit f5281d0 into main Feb 7, 2024
1 check passed
@LNSD LNSD deleted the lnsd/query-settings-ext branch February 7, 2024 15:53
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.

2 participants