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

Feature | Ability to overwrite OAuth2 request classes #242

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

Sammyjo20
Copy link
Member

Fixes #239

This PR adds a few overwritable protected methods on the AuthorizationCodeGrant and ClientCredentialsGrant OAuth2 traits. These methods will allow you to overwrite the instantiation of the request classes yourself, so if you need to completely swap the classes out to your own requests, you can now do it.

With future versions of Saloon, I think this should be the preferred way of modifying the request classes, including adding query parameters or changing the request body, because now we have multiple ways of modifying the requests and it may get a little confusing.

@what-the-diff
Copy link

what-the-diff bot commented Jun 23, 2023

🌟 PR Summary 🌟

  • Enhanced Authorization Code Grant
    • Added some awesome new methods to improve request handling! 🚀
  • Enhanced Client Credentials Grant
    • Made it even better with a new method for access token requests! 🎉
  • Exciting New Tests
    • We made sure everything works perfectly by adding test cases for our new methods and classes! 🧪
  • Customizable Requests
    • Included some shiny new classes to make it super easy to customize requests! 🛠️
  • New Files Galore
    • We added a bunch of new files to help this update reach its full potential! 📁

Enjoy all the improvements! 😄

Copy link
Member Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

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

Self review 🚀

@Sammyjo20 Sammyjo20 merged commit 54bfd3c into v2 Jun 23, 2023
@Sammyjo20 Sammyjo20 deleted the feature/allow-oauth-requests-to-be-overwritten branch June 23, 2023 20:08
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.

GetAccessTokenRequest with HasJsonBody
1 participant