grails-spring-security-core icon indicating copy to clipboard operation
grails-spring-security-core copied to clipboard

GPSPRINGSECURITYCORE-199: SpringSecurityUtils.doWithAuth doesn't work with LDAP

Open graemerocher opened this issue 13 years ago • 0 comments

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']

graemerocher avatar Dec 08 '12 10:12 graemerocher