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 :)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121686#4121686
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121686
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user