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

[REQ] Accept a payload of type byte[] in OAuth.getAuthorizationHeader() #37

Open
rowland66 opened this issue Mar 1, 2024 · 1 comment

Comments

@rowland66
Copy link

The current OAuth.getAuthorizationHeader() method has a payload parameter of type String. In cases where the payload is not available as a String, conversion to a String might be impossible (binary data) or inefficient in memory usage. Providing a overloaded version of OAuth.getAuthorizationHeader() that accepts a byte[] payload would be helpful in these cases.

The existing code also makes an assumption that the character set for all string values passed to OAuth.getAuthorizationHeader() is the same. This may not be a safe assumption in all cases. Allowing payload to be passed a bytes provides a partial workaround.

I would be happy to provide the trivial PR to address this issue if desired.

@ShimonaR-MC
Copy link
Contributor

@rowland66, feel free to submit a PR with your recommended changes and we could take a look. Thanks.

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

No branches or pull requests

2 participants