Develop Binding with OAuth1

I’m currently developing a binding that interacts with an external REST API.The only authentication option for this API is OAuth1. jetty-client does not seem to support OAuth1. My plan is to use scribejava-core instead. Is there any recommended OAuth1-capable HTTP client already used within OpenHAB?

Both OAuth 1 and OAuth 2 rely on custom Authorization scheme (next to basic/digest). It means that any HTTP client library which allows you to pass value for authorization header should be sufficient.

What you need is a OAuth 1.0 client library which can handle redirects and whole dance related to access delegation. You can use ie. https://github.com/googleapis/google-oauth-java-client which handles both OAuth 2 and 1. It is shipped with OSGi metadata (not sure about its quality) thus should be sufficient to go.

Best,
Łukasz

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.