I'm trying to authenticate on my website with OpenID, using Java code
from the openid4java library.
After the user specifies his OpenID provider, the server (Tapestry) is
supposed to forward him to the appropriate web page (like Google) to get
authenticated, then it forwards the user back to my website. This
works, except I am supposed to keep track of certain Discovery
Information (the org.openid4java.discovery.DiscoveryInformation object)
in the session. It doesn't stick. And neither does even a simple
String object.
Maybe when the authenticating site forwards the user back to my site,
Tapestry forgets the session... Hang on. I just got Josh's email.
Tim Koop
t...@timkoop.com <mailto:t...@timkoop.com>
www.timkoop.com <http://www.timkoop.com>
On 11/05/2011 1:25 PM, Thiago H. de Paula Figueiredo wrote:
On Wed, 11 May 2011 15:17:42 -0300, Tim Koop <t...@timkoop.com> wrote:
Thanks Josh (and Thiago).
You're welcome!
I added (create = false), and this certainly got rid of the error
message. However, my session object is still either not getting set
correctly (even though I clearly visit the page where it gets set,
and I even write a message to the log saying I was there), or it
isn't being retrieved correctly, because it is null when I want to
read it.
That's strange. I've never seen this kind of bug. Are you sure you
haven't any other @SessionState field with type String? If yes and
it's set to null somewhere, the bug is in your code.
My only thought is this: On the page where I set the session object,
that page returns a java.net.URL object, redirecting the browser to
another page. Perhaps this is preventing the session object from
being stored correctly?
I don't think so. Why are you returning an URL object to redirect to a
page in your application? Return the page Class instance or one
instance of the page obtained through a field with @InjectPage.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org