oauth1-signer-java icon indicating copy to clipboard operation
oauth1-signer-java copied to clipboard

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

Open rowland66 opened this issue 11 months ago • 1 comments

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.

rowland66 avatar Mar 01 '24 15:03 rowland66

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

ShimonaR-MC avatar Mar 21 '24 06:03 ShimonaR-MC

Closing due to long period of inactivity.

ShimonaR-MC avatar Jul 03 '24 11:07 ShimonaR-MC