oauthglassfishjerseyoauth-provider

jersey.oauth.signature.UnsupportedSignatureMethodException: HMAC-SHA1


I'm working on an OAuth server implementation based on the jersey-oauth 1.16 contrib in GlassFish 3.1.2 container and I'm getting this exception when trying to connect to it via Scribe client API:

AuthFilter.filter: 
com.sun.jersey.oauth.signature.UnsupportedSignatureMethodException: HMAC-SHA1 
for com.sun.jersey.oauth.server.OAuthServerRequest@13a50796

https://wikis.oracle.com/display/Jersey/OAuth states "It supports the signature methods outlined in OAuth Core 1.0 specification: HMAC-SHA1, RSA-SHA1, and PLAINTEXT" so I'm confused. Do I have some misconfiguration issue? Any suggestion/pointer/idea would be welcome. Thanks!


Solution

  • Should this happen to anyone else, I thought I would share how I resolved this issue.

    GlassFish 3.1.2 seems to still be stuck to an old version of Jersey 1.11. I guess there's some sort of incompatibility between Jersey 1.11 and the oauth contrib 1.16.

    http://jersey.java.net/nonav/documentation/latest/glassfish.html describes how Jersey may be updated in the GlassFish container. It's a bit tricky to do, but I've now Jersey 1.17 and it's working like a charm. :)