This content has been marked as final.
Show 3 replies
-
1. Re: Conditional redirect after authenticator action
nickarls Jan 20, 2008 5:27 PM (in response to mki_ffm)How about setting "something somwhere" in the authenticator method and then placing an observer on the successful login event and redirect there?
(note, not tried, just brainstorming) -
2. Re: Conditional redirect after authenticator action
nickarls Jan 20, 2008 5:29 PM (in response to mki_ffm)ok, the "something somewhere" can probably be used in a test for pages.xml too for redirection.
-
3. Re: Conditional redirect after authenticator action
jacob.orshalick Jan 20, 2008 6:30 PM (in response to mki_ffm)Yes, the approach nickarls is describing works quite well.
I implemented something similar by wrapping the Seam Identity component and included the authenticate method in the wrapper. Your wrapping login() method can then delegate the login call and then return any navigation String you want based on what occurred in the authenticate method.
For example,@Name("customIdentity") public class CustomIdentity { private String authenticateResult; ... ... public String login() { // delegate login call which in turn calls authenticate method Identity.instance().login(); return authenticateResult; } ... ... public boolean authenticate() { // logic that authenticates and sets authenticateResult } ... ... }
Simply invoke the wrapping login method from your login page. I apologize if there are any errors in the code as I'm just coding directly in the post :)