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

Allow custom endpoint params #3493

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Allow custom endpoint params #3493

wants to merge 2 commits into from

Conversation

partydragen
Copy link
Member

@partydragen partydragen commented Mar 9, 2024

Add ability to add custom params to execute function

Example my OAuth2 module have a AccessTokenAuthEndpoint that allow Access Token to access its api
However the Endpoints itself don't know who user authed as im not able to transfer that data to endpoint, This will allow that

As now my AccessTokenAuthEndpoint auth method can add User into CustomParams so now the endpoint can restrict api usage for that user ONLY

Usage by my OAuth2 Module: partydragen/Nameless-OAuth2@ee01af4

@partydragen partydragen added this to the 2.2.0 milestone Mar 9, 2024
Copy link
Member

@tadhgboyle tadhgboyle left a comment

Choose a reason for hiding this comment

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

I'm confused what functionality this provides, in your example commit the customParams is never read from/called. Can you perhaps explain a different way?

@partydragen
Copy link
Member Author

partydragen commented Mar 12, 2024

I'm confused what functionality this provides, in your example commit the customParams is never read from/called. Can you perhaps explain a different way?

Its being added to execute function
partydragen/Nameless-OAuth2@ee01af4#diff-c64a5bfe66e837e1b28172db725aaccd0a4bbeb0dbbaddc8abee369cb0570196R11

public function execute(Nameless2API $api, AccessToken $token): void {
So it being execute(API, CUSTOM AUTH PARAMS, Transfomers)

Also this this OAuth endpoint that adding AccessToken partydragen/Nameless-OAuth2@158fd22

So the endpoint know who user authoriced to limit the api data from that user only

Pretty much that Auth methods being able to register params to endpoints instead of just Transformers

And the actuall call happning here f1aec3c#diff-52869f0ee82251d95009587780c0e900fa379fa99957f42b97d13cde939b05f3R72 thats add it to execute

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.

None yet

2 participants