users@glassfish.java.net

Re: OAuth, REST and Glassfish

From: Martin Matula <martin.matula_at_oracle.com>
Date: Fri, 13 May 2011 14:38:39 +0200

Hi Jan,
GlassFish uses Jersey as the JAX-RS implementation. One of the Jersey
sub-projects which is not bundled with GlassFish, but can easily be
included in your application is jersey-oauth. It implements OAuth 1.0 -
both the server and the client side. On the server side you can enforce
OAuth in the form of a ContainerFilter.
Please check the javadoc:
http://jersey.java.net/nonav/apidocs/latest/contribs/jersey-oauth/oauth-server/index.html
In the recent builds (to be released as Jersey 1.7 next week) we also
added support for 2-legged OAuth. I still haven't had time to provide a
simple example - let's see if you can extract enough information from
the javadoc.
If you have more questions, feel free to ask at users_at_jersey.java.net.
Thanks,
Martin

On 13.5.2011 12:13, forums_at_java.net wrote:
> Hi,
>
> I have the following design problem. I need to develop a
> REST interface in
> Glassfish v3. This seems to be no problem at all. But now I have to
> add OAuth
> (Provider) to the REST-interface. I am currently using CDI a lot and I
> need
> to figure out a way to streamline OAuth with CDI. Could there be a way
> to add
> an Interceptor to the resource to catch the OAuth-logic? Are there any
> samples on this or did somebody already did something similar? There
> are a
> lot of samples around but none really for Glassfish v3 and a nice
> out-of-the-box "standard" integration in REST. I would like to create a
> example-project which can be added to an example repository, but
> I need some
> help to accomplish this.
>
> Greetings
>
> Jan De Cooman
>
>
> --
>
> [Message sent by forum member 'ossaert']
>
> View Post: http://forums.java.net/node/801801
>
>