Thanks very much Scott, that worked! The only other thing I had to do was to configure my subclass as the ticket resource in restlet-servlet.xml.
BTW if you refactored that TicketResource class to use a factory to create the credentials object, then you'd be able to accomplish this same thing via configuration. Just a thought! Morley From: Scott Battaglia [mailto:[email protected]] Sent: September-09-12 10:19 PM To: [email protected] Subject: Re: [cas-user] Android integration with 'remember me' I haven't tried it but you may be able to do it. You can override the "obtainCredentials" method in: https://github.com/Jasig/cas/blob/master/cas-server-integration-restlet/ src/main/java/org/jasig/cas/integration/restlet/TicketResource.java To use the: https://github.com/Jasig/cas/blob/master/cas-server-core/src/main/java/o rg/jasig/cas/authentication/principal/RememberMeUsernamePasswordCredenti als.java Cheers, Scott On Tue, Sep 4, 2012 at 12:20 PM, Morley Howell <[email protected]> wrote: Any thoughts on this? Is my description of the issue too vague? Essentially what I'm hoping for is to be able to call/configure the RESTful API so that it works in a similar way to the 'remember me' feature on the login page. Perhaps this might involve having the RESTful request for the TGT also return a 'remember me' cookie, like the login form does? Maybe that same API call could optionally receive the 'remember me' cookie as well instead of a username/password? Thanks, Morley From: Morley Howell [mailto:[email protected]] Sent: August-30-12 6:04 PM To: [email protected] Subject: [cas-user] Android integration with 'remember me' Hi, I have a J2EE server application that is using CAS 3.4.7 for authentication. I need a way for an Android application to authenticate itself with CAS based on user-entered credentials so that it can call some secured REST services to retrieve data from my server application. Given that OAuth support isn't available until CAS 3.5.0, this isn't an option at the moment. I took a look at the RESTful API, which seems promising. The other thing I need though is a 'remember me' feature, which we already have for Web-based access (i.e. we've enabled and configured CAS's 'remember me' feature). The session timeout on the server application and the TGT timeout is set for 20 minutes, and the Android application needs to have an option for a much longer timeout than that. Is there any way I can get the 'Remember Me' feature to work with the RESTful API? Is there some other approach entirely that I've missed? Thanks, Morley Howell This e-mail message is confidential, may be privileged and is intended for the exclusive use of the addressee. Any other person is strictly prohibited from disclosing, distributing or reproducing it. If the addressee cannot be reached or is unknown to you, please inform us immediately and delete this e-mail message and destroy all copies. Thank you. -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user This e-mail message is confidential, may be privileged and is intended for the exclusive use of the addressee. Any other person is strictly prohibited from disclosing, distributing or reproducing it. If the addressee cannot be reached or is unknown to you, please inform us immediately and delete this e-mail message and destroy all copies. Thank you. -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
