I'm using acegi security in Grails. Is there a way to log a failed login attempt as info or warning so:
ERROR springsecurity.GrailsDaoImpl - User not found: XXXXXX
is logged as required ?
Thanks
I'm using acegi security in Grails. Is there a way to log a failed login attempt as info or warning so:
ERROR springsecurity.GrailsDaoImpl - User not found: XXXXXX
is logged as required ?
Thanks
You can register listeners for security events, check for the failed login event
http://grails.org/AcegiSecurity+Plugin+-+Acegi+Events
Or you can register call back closures that are called when the events are triggered
useSecurityEventListener = true
onInteractiveAuthenticationSuccessEvent = {e, appCtx ->
// handle InteractiveAuthenticationSuccessEvent
}
onAbstractAuthenticationFailureEvent = {e, appCtx ->
// handle AbstractAuthenticationFailureEvent
}
onAuthenticationSuccessEvent = {event, appCtx ->
// handle AuthenticationSuccessEvent
}
onAuthenticationSwitchUserEvent = {e, appCtx ->
// handle AuthenticationSwitchUserEvent
}
onAuthorizationEvent = {e, appCtx ->
// handle AuthorizationEvent
}