users@jersey.java.net

[Jersey] Re: Authenticating a REST user with Tomcat

From: Joseph Mocker <jmocker_at_velti.com>
Date: Thu, 18 Jul 2013 11:06:18 -0700

If you are already using Spring for DI or anything, you may want to look into Spring Security. It integrates well, but not trivially with Jersey. There are several tutorials on the web to show you though. Spring Security provides a flexible framework for authentication, should be able to manage session expiry.

  --joe


[Velti]<http://www.velti.com> Joseph Mocker | Senior Software Architect
t +1.650.566.7033 m +1.408.676.6625
e jmocker@velti.com @Mobclix<http://twitter.com/Mobclix>
[cid:sep11116071d8]
The leading global technology provider of
mobile marketing and advertising solutions

<http://mwc.velti.com/meet-us>

On Jul 18, 2013, at 8:18 AM, Matthew Hall wrote:

You can store sessions in a hash with an expiry time, and then toss out expired requests with a Filter injected in the request path. LinkedHashMap is a good tool for tracking things which need to get cached and expired. You could also use memcache, Redis, etc.
--
Sent from my mobile device.
Martin O'Shea <appy74_at_dsl.pipex.com<mailto:appy74_at_dsl.pipex.com>> wrote:
Hello
I am a REST newbie and I?m in the process of setting up a web service with Jersey. I already have client and server communicating with each other by sending XML requests. And I would like the user of the client, an android app, to be authenticated by the server for a set period of time and then have to re-authenticate after that time has expired.
Can anyone suggest anything?
Thanks
Martin O?Shea.




logo111178b603
(image/gif attachment: logo111178b603)

sep11116071d8
(image/gif attachment: sep11116071d8)