grails-spring-security-core
grails-spring-security-core copied to clipboard
GPSPRINGSECURITYCORE-199: SpringSecurityUtils.doWithAuth doesn't work with LDAP
Original Reporter: mmorett Environment: Not Specified Version: Grails-Spring-Security-Core 1.2.7.3 Migrated From: http://jira.grails.org/browse/GPSPRINGSECURITYCORE-199
SpringSecurityUtils.doWithAuth("mmorett", { println "xxx" })
That little snippet will not work with a user that is configured in LDAP and works (i.e. can log in with this user). It produces a RuntimeException.
java.lang.RuntimeException: The specified user domain class 'Person' is not a domain class
The LDAP plugin is configured in Config.groovy with this line: grails.plugins.springsecurity.providerNames = [ 'ldapAuthProvider', 'anonymousAuthenticationProvider']