grailsuser MissingPropertyException

时间:2014-07-10 20:38:10

标签: grails spring-security

我正在尝试使用<sec:loggedInUserInfo field="firstName"/>,我收到了MissingPropertyException。我扩展了用户并配置如下。我不确定我错过了什么......

resources.groovy

preAuthenticatedAuthenticationProvider(org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider) {
        preAuthenticatedUserDetailsService = ref('preAuthenticatedUserDetailsService')
    }

preAuthenticatedUserDetailsService(org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper) {
        userDetailsService = ref('userService' )
    }

userService(org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService){
        grailsApplication = ref('grailsApplication')
    }

我还在Config.groovy中配置了我的域类

grails.plugins.springsecurity.providerNames = ['preAuthenticatedAuthenticationProvider' ,'anonymousAuthenticationProvider']

// Added by the Spring Security Core plugin:
grails.plugins.springsecurity.userLookup.userDomainClassName = 'com.administration.AuthUser'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'com.administration.AuthUserAuthRole'
grails.plugins.springsecurity.authority.className = 'com.administration.AuthRole'

0 个答案:

没有答案