Return to Snippet

Revision: 12540
at March 18, 2009 14:28 by lucastex


Initial Code
import org.springframework.context.*
import org.springframework.security.event.authentication.*
import org.springframework.security.event.authorization.AbstractAuthorizationEvent


class AcegiEventListener implements ApplicationListener {

	void onApplicationEvent(final ApplicationEvent e) {

		if (e instanceof AbstractAuthenticationEvent) {

			if (e instanceof AuthenticationSuccessEvent) {
				
				println "** Attention: User ${e.source.principal.username} is logged!"
			}
		}
	}
}

Initial URL

                                

Initial Description

                                

Initial Title
Implementing my own Acegi Security events listener

Initial Tags
event, groovy

Initial Language
Groovy