1

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!

TheArchitect
  • 2,161
  • 1
  • 12
  • 16

2 Answers2

1

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. :)

TheArchitect
  • 2,161
  • 1
  • 12
  • 16
  • m8, I did made the change to update to 1.17, but the same exception still happens. Did I missed anything? – Xiangyu Apr 23 '13 at 08:46
  • Possibly. Make sure you put the jars in the correct glassfish/modules dir and you shutdown GF + rm domain/osgi-cache – TheArchitect May 07 '13 at 17:15
0

Unfortunately, I cannot add comments yet, but I just wanted to point out that the latest Jersey libraries for GlassFish can be found in this location. I was able to follow the instructions and make OAuth+Jersey work with Glassfish v3. Thanks, TheArchitect!

m0squito
  • 143
  • 1
  • 5