我正在开发一个grails web应用程序,它使用spring安全性来实现ldap。我们需要设置一种情况,而不是用户输入用户名和密码证书(如果没有找到证书,甚至回滚到用户名和密码将是理想的设置)。我在网上查了一下,一直试图无济于事,我只是无法让它上班。不确定我是否正确生成证书或者我的spring安全配置设置是否错误。有人可以帮忙吗?谢谢
编辑:我的Config.groovy文件看起来像这样
System.setProperty("javax.net.ssl.trustStore","/Library/Java/JavaVirtualMachines/1.6.0_31-b04-415.jdk/Contents/Home/lib/security/cacerts")
System.setProperty("javax.net.ssl.trustStorePassword","changeit")
grails.plugins.springsecurity.ldap.context.managerDn = 'cn=administrator,cn=users,dc=ldap,dc=example,dc=com'
grails.plugins.springsecurity.ldap.context.managerPassword = 'password'
grails.plugins.springsecurity.ldap.context.server = 'ldaps://ldap.example.com:636/'
grails.plugins.springsecurity.ldap.authorities.ignorePartialResultException = true // typically needed for Active Directory
grails.plugins.springsecurity.ldap.search.base = 'dc=ldap,dc=example,dc=com'
grails.plugins.springsecurity.ldap.search.filter="sAMAccountName={0}" // for Active Directory you need this
grails.plugins.springsecurity.ldap.search.searchSubtree = true
grails.plugins.springsecurity.ldap.auth.hideUserNotFoundExceptions = false