我已经阅读了有关重定向循环和Spring Security的其他几个问题,但是它们都没有解决我的问题。我已经将应用程序升级到Grails 2.4.3和Spring Security 2.0-RC4。我在Config.groovy中有以下内容
grails.plugin.springsecurity.active = true
grails.plugin.springsecurity.auth.forceHttps = false
grails.plugin.springsecurity.userLookup.userDomainClassName = 'com.mypackage.User'
grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'com.mypackage.UserRole'
grails.plugin.springsecurity.authority.className = 'com.mypackage.Role'
grails.plugin.springsecurity.securityConfigType = "Annotation"
grails.plugin.springsecurity.voterNames = [
'authenticatedVoter', 'organizationRoleVoter'
]
grails.plugin.springsecurity.useSecurityEventListener = true
grails.plugin.springsecurity.logout.handlerNames =
['rememberMeServices',
'securityContextLogoutHandler',
'securityEventListener']
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
'/': ['permitAll'],
'/index': ['permitAll'],
'/index.gsp': ['permitAll'],
'/assets/**': ['permitAll'],
'/**/js/**': ['permitAll'],
'/**/css/**': ['permitAll'],
'/**/images/**': ['permitAll'],
'/**/favicon.ico': ['permitAll'],
'/login/**': ['permitAll'],
'/login.gsp': ['permitAll']
]
我在Config.groovy的开发块中有这个
grails.plugin.springsecurity.secureChannel.definition = [
'/**': 'REQUIRES_SECURE_CHANNEL'
]
当我通过以下网址访问我的应用时:
https://localhost:8443/a/login/auth
我得到了一个重定向循环。