Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
The solution:
There's something very important missing from this example. If you try to
implement this you'll find that when the social networking site calls the
successUrl a new session is created and you have no access to the stored
SocialAuthManager. Of course there is no jsessionid cookie so a new session has
to be created.
To fix this all you need to do is this (as per servlet spec 7.1.3 URL
rewriting):
String successUrl=
"http://opensource.brickred.com/socialauthdemo/socialAuthSuccessAction.do;jsessi
onid=";
String url = manager.getAuthenticationUrl(id, successUrl + sessionId);
You need to figure out how to get the session id in your environment.
Original comment by healey.b...@gmail.com
on 7 Sep 2012 at 10:06
You can use HttpServletResponse encodeURL method to encode the url before
redirect, that will get all the session info. Recommended for all redirects.
Original comment by kumar.sa...@gmail.com
on 20 Oct 2012 at 2:58
I have deployed demo on tomcat and jboss. It is working fine on both server and
no need to append jsession. But in your case if there is a need to append it
then you can do it manually as you are doing in successUrl. And it is always in
your hand how you want to redirect the user on authentication page.
Original comment by tarun.na...@3pillarglobal.com
on 19 Jun 2013 at 10:35
Original issue reported on code.google.com by
healey_b...@yahoo.co.uk
on 6 Sep 2012 at 3:35