This content has been marked as final.
Show 3 replies
-
1. Re: How to disable the Identity.EVENT_LOGIN_SUCCESSFUL event?
gurkavcu Jun 16, 2010 9:22 AM (in response to jochus.jochenhebbrecht.hotmail.com)Create class that extends from org.jboss.seam.security.FacesSecurityEvents and override the necessary event functions like:
@Name("org.jboss.seam.security.facesSecurityEvents") @Scope(ScopeType.APPLICATION) @Install(precedence = Install.APPLICATION, classDependencies = "javax.faces.context.FacesContext") @BypassInterceptors @Startup public class EventHandler extends org.jboss.seam.security.FacesSecurityEvents { @Override @Observer(Identity.EVENT_LOGIN_SUCCESSFUL) public void addLoginSuccessfulMessage() { } @Override @Observer(Identity.EVENT_ALREADY_LOGGED_IN) public void addAlreadyLoggedInMessage() { } @Override @Observer(Identity.EVENT_LOGIN_FAILED) public void addLoginFailedMessage(LoginException ex) { StatusMessages.instance().add(Severity.ERROR, "org.jboss.seam.loginFailed", null, "",""); } }
-
2. Re: How to disable the Identity.EVENT_LOGIN_SUCCESSFUL event?
jochus.jochenhebbrecht.hotmail.com Jun 17, 2010 3:05 AM (in response to jochus.jochenhebbrecht.hotmail.com)Thanks Umut!
-
3. Re: How to disable the Identity.EVENT_LOGIN_SUCCESSFUL event?
kragoth Jun 17, 2010 8:29 PM (in response to jochus.jochenhebbrecht.hotmail.com)Pretty sure that all you really need to do is just override the key for that message in your own messages file. Works for me!
org.jboss.seam.loginSuccessful=
In my opinion this is a much cleaner way of getting rid of the message.