Java client to authenticate against CAS server -


i have written client app java following: https://wiki.jasig.org/display/casum/restful+api

i able tgt , service ticket. able "validate" service ticket against cas through app i.e. against:

https://<host>:8443/cas/servicevalidate 

using service ticket, able verify works browser:

https://<host>:8443/myproject/login/cas?ticket=<ticket_id_from_my_client_app>&service=<encoded url of service> 

works

but service ticket not work app. tried:

resttemplate rt = new resttemplate(); responseentity<string> s1 = rt.getforentity("https://<host>:8443/myproject/login/cas?ticket=<ticket_id_from_my_client_app>&service=<encoded url of service>", string.class); 

the response default login page cas. when trying on browser again, works. note, using identical url both testing in browser , app.

(i have modified cas config extend life of tgt , service tickets 1 hour , validity count till 1000, know expiration not problem.)

what problem? have cookies?

the problem resttemplate stateless. so, used: statefullresttemplate https://github.com/folkengine/statefulrestclient.git


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -