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

How to update HMAC-SHA1 to HMAC-SHA256 in android lib #22

Open
yokikathir opened this issue Jun 15, 2022 · 2 comments
Open

How to update HMAC-SHA1 to HMAC-SHA256 in android lib #22

yokikathir opened this issue Jun 15, 2022 · 2 comments

Comments

@yokikathir
Copy link

HMAC-SHA1 will no longer be accepted as a signature method for TBA integrations. Before your account is upgraded to 2023.1, you must update your TBA integrations to use the HMAC-SHA256 signature method. Please solve the issue

@pakerfeldt
Copy link
Owner

Feel free to send a PR. I'm not actively working on this project anymore.

@levimllr
Copy link

levimllr commented May 4, 2023

signpost-core has a HmacSha256MessageSigner, and any extension of the AbstractOAuthConsumer (such as OkHttpOAuthConsumer) can set its message signer. Thanks to this, you can use the HMAC-SHA256 signature method in your consumer simply by adding a dependency on the latest version of signpost-core and doing the following:

    OkHttpOAuthConsumer consumer = new OkHttpOAuthConsumer(consumerKey, consumerSecret);
    consumer.setMessageSigner(new HmacSha256MessageSigner());

Would be nice to initialize the consumer with the appropriate signer, but that may be something to bring up with the signpost folks.

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

3 participants