There was a thread a month or so ago that I participated in that covered
doing authentication within a login page class.
Take a look at:
http://thread.gmane.org/gmane.comp.java.tapestry.user/59931/
There was an important part cut off from the code I posted that wound up in
another thread:
http://article.gmane.org/gmane.comp.java.tapestry.user/60045
Jonathan
> -Original Message-
> From: Franz Amador [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 25, 2008 6:49 PM
> To: users@tapestry.apache.org
> Subject: T5: How can I initialize a logged-in user ASO from tapestry5-
> acegi?
>
> I'm using tapestry5-acegi for authentication. I'd like to use
> @ApplicationState to make the logged-in user object accessible in my
> pages, e.g.
>
> @ApplicationState
> private User user;
>
> Somewhere, however, I must initialize my ASO variable when the user
> logs in. Where can I do this?
>
> The only place I have thought of is in my
> UserDetailsServiceImpl.loadUserByUsername method, which Acegi calls
> during login. I tried injecting the ApplicationStateManager into
> UserDetailsServiceImpl and calling "asoManager.set(User.class, user)"
> from loadUserByUsername, but that throws an exception.
>
> Note that I cannot do it in my Login page class, because that submits
> to something internal to Acegi; I do not get access to the logged-in
> user there.
>
> Surely someone out there has done this already. Any help greatly
> appreciated. Even better, please add the solution to the
> tapestry5-acegi documentation.
>
> -
> 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]