Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onInteractiveAuthenticationSuccessEvent is not firing after login #637

Open
haaah opened this issue May 7, 2021 · 0 comments
Open

onInteractiveAuthenticationSuccessEvent is not firing after login #637

haaah opened this issue May 7, 2021 · 0 comments

Comments

@haaah
Copy link

haaah commented May 7, 2021

Steps to Reproduce

  1. Install spring security core plugin version 4.0.3
  2. Execute grails s2-quickstart com.yourapp User Role
  3. Enable security event listener and turn on both onAuthenticationSuccessEvent and onInteractiveAuthenticationSuccessEvent callback within application.groovy

application.groovy

// Added by the Spring Security Core plugin:
grails.plugin.springsecurity.userLookup.userDomainClassName = 'iam.User'
grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'iam.UserRole'
grails.plugin.springsecurity.authority.className = 'iam.Role'
grails.plugin.springsecurity.auth.loginFormUrl = '/#/login'
grails.plugin.springsecurity.rest.token.storage.jwt.expiration = 3600             //seconds

//enable event listener
grails.plugin.springsecurity.useSecurityEventListener = true

grails.plugin.springsecurity.onAuthenticationSuccessEvent = { e, appCtx ->
	// handle AuthenticationSuccessEvent
	println("authentication success event")
}

grails.plugin.springsecurity.onInteractiveAuthenticationSuccessEvent = { e, appCtx ->
	// handle InteractiveAuthenticationSuccessEvent
	println("interactive authentication success event")
}

Expected Behaviour

  1. Login with username and password through http://localhost:8080/APP/api/login
  2. Printout both line after authentication went through
    • "authentication success event"
    • "interactive authentication success event"

Actual Behaviour

Printout from console

authentication success event
authentication success event
authentication success event
authentication success event
authentication success event
authentication success event

The line "interactive authentication success event" wasn't printout

Environment Information

OS: Mac BigSur
Grails: 4.0.4
JDK: OpenJDK Runtime Environment (Zulu 8.54.0.21-CA-macosx) (build 1.8.0_292-b10)
Plugin Version: spring-security-core:4.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant