Это не поддерживается, но достаточно легко создать пользовательский UserDetailsService, см. http://www.grails.org/AcegiSecurity+Plugin+-+Custom+UserDetailsService
Примерно так должно работать:
package com.yourcompany.yourapp
import org.codehaus.groovy.grails.plugins.springsecurity.GrailsUserImpl
import org.springframework.security.GrantedAuthority
import org.springframework.security.GrantedAuthorityImpl
import org.springframework.security.userdetails.UserDetails
import org.springframework.security.userdetails.UserDetailsService
import org.springframework.security.userdetails.UsernameNotFoundException
class MyUserDetailsService implements UserDetailsService {
UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
def userDetails
User.withTransaction { status ->
def users = User.executeQuery(
'from User where lower(username) = :username',
[username: username.toLowerCase()])
if (users.size() == 1) {
def user = users[0]
GrantedAuthority[] authorities = user.authorities.collect {
new GrantedAuthorityImpl(it.authority) }
userDetails = new GrailsUserImpl(
user.username, user.password, user.enabled,
true, true, true, authorities, user)
}
}
if (!userDetails) {
throw new UsernameNotFoundException('User not found', username)
}
userDetails
}
}