We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In a Grails 4 webapp with Spring Security plugin dependency
org.grails.plugins:spring-security-core:4.0.0.RC2
in any controller inject dependencies
def springSecurityService def sessionRegistry
and include this snippet in an action A:
A
println 'principal: ' + springSecurityService.principal?.username println 'currentUser: ' + springSecurityService.currentUser println '-------------' println 'principal sessions: ' + sessionRegistry.getAllSessions(springSecurityService.principal, true) println 'all principals: ' + sessionRegistry.allPrincipals.collect { it.username }
Both snippets should print
principal: [email protected] currentUser: UserDomainClass(email:[email protected]) ------------- principal sessions: [org.springframework.security.core.session.SessionInformation@644c9f8a] all principals: [[email protected]]
2nd execution shows session registry being erased, while principal is maintained as expected
principal: [email protected] currentUser: UserDomainClass(email:[email protected]) ------------- principal sessions: [] all principals: []
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In a Grails 4 webapp with Spring Security plugin dependency
in any controller inject dependencies
and include this snippet in an action
A
:Steps to Reproduce
A
A
againExpected Behaviour
Both snippets should print
Actual Behaviour
2nd execution shows session registry being erased, while principal is maintained as expected
Environment Information
The text was updated successfully, but these errors were encountered: