@Observes LoginFailedEvent.getLoginException() is null
------------------------------------------------------
Key: SEAMSECURITY-99
URL:
https://issues.jboss.org/browse/SEAMSECURITY-99
Project: Seam Security
Issue Type: Bug
Affects Versions: 3.1.0.Beta1
Environment: Seam Security 3.1.0.Beta2, Ubuntu 11.04 64-bit, JBoss AS 7.0.1
everything
Reporter: Hendy Irawan
Sample code:
public void addLoginFailedMessage(@Observes LoginFailedEvent event, Messages messages) {
logger.info("Login failed: {}", (Object)event.getLoginException());
if (event.getLoginException() != null) {
messages.error(event.getLoginException().getMessage());
} else
messages.error("Login failed: " + event);
}
Assuming the following error:
03:46:05,165 ERROR [org.jboss.seam.security.jaas.JaasAuthenticator]
(http--127.0.0.1-8080-6) JAAS authentication failed:
javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
at
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:252)
[picketbox-4.0.1.jar:4.0.1]
at
org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:154)
[picketbox-4.0.1.jar:4.0.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[:1.6.0_22]
event.getLoginException() returns null, it should return a FailedLoginException instance.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira