David Leangen wrote:
Hi, Nino,
Sorry, I haven't been following this list daily lately. I probably should,
since I just sifted through 500 messags. Wow, this list is really active!
Yeah, it's really knocking away :) So much that it really feels silent
on other forums..
Anyway, I did say I'd get back to you once I completed my OpenID
integration, and I just completed it recently.
Ahh great.
However, I'm not sure I can really be of much use to you. The fact is that I
had to pretty much redo everything in a custom way. As you know, I am
running Wicket in OSGi using pax-wicket. This really changes a lot of
things, especially the way I'm using Wicket. My solution will certainly not
be generally applicable, so I won't even bother trying.
no problem.
In any case, the login process using OpenID is a little different from the
"traditional" process. I used a few tricks in Wicket to get this to work.
(I'm writing from [my bad] memory, so please bear with me...) If you recall,
when a user logs in, there is some exception thrown like
UnauthorizedInstantiationException or something. There is a handler that can
be registered for this.
The default flow looks something like this:
Is the user authenticated?
No: --> throw new RestartAtSomethingException( LoginPage.class )
Yes: --> throw new SecurityExceptionOrSomethingLikeThat
What I did was add an extra step for OpenID:
Is the user authenticated?
No: --> throw new RestartAtSomethingException( LoginPage.class )
Is the user registered?
No: --> throw new RestartAtSomethingException( RegistrationPage.class )
Yes: --> throw new SecurityExceptionOrSomethingLikeThat
This seems to work well. Sorry I don't remember the actual names. ;-)
No problem, I have this part working.
As for the authentication stuff (I think you were posing a question about
this, too), I used my own custom implementation based on the UserAdmin
service. It works very well and is very flexible, but it did take a while to
build correctly.
There was a lot more to it, but I would say those were the main aspects. Oh,
forgot to mention that I used openid4java. It seems to work ok, except for
the fact that is depends on openxri, which does some crappy dynamic
instantiation of xml parsers (I say "crappy" because it's a hassle in an
OSGi environment).
Yeah I saw your post on openid4java list.
If you think there is something general we could make out of this, I'd be
happy to work with you, but I think it would only apply for pax-wicket
users. I just don't see how this solution could work for general Wicket
users.
Hmm, I do actually have something working, which seems to be really
simple. Using openid4java, my only problem are that I cant seem to get
any openid providers to give me the requested attributes, like email and
name. How did you solve this?
Cheers,
Dave
-----Original Message-----
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: 2 December 2008 04:31
To: users@wicket.apache.org
Subject: Openid integration?
Hi Guys
Have any of you tried to do a openid integration ?
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]