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 for custom authentication mechanisms #142

Open
1 task done
spacedmonkey opened this issue Jan 16, 2024 · 1 comment
Open
1 task done

Allow for custom authentication mechanisms #142

spacedmonkey opened this issue Jan 16, 2024 · 1 comment

Comments

@spacedmonkey
Copy link

Feature Request

Describe your use case and the problem you are facing

Allow for custom authentication mechanisms to be used for REST API request to http requests. At the moment, there is now was to pass custom headers and paramters to REST API to implement different, like OAuth 1 / OAuth 2 / JWT tokens.

Describe the solution you'd like

Adding a filter or other hook at this line

$response = Utils\http_request( $method, rtrim( $this->api_url, '/' ) . $route, $assoc_args, $headers );

This would allow a developer to modify header passed to the request so that different authentication mechanisms can be implemented.

@danielbachhuber
Copy link
Member

I'm open to this 👍

Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.

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

No branches or pull requests

2 participants