If you need to use several properties to authenticate user with Spring Security, for example, by login and domain, there is no built-in way to do it. Even when you override UserDetailsService it only calls method with one username parameter.
Fortunately, there is easy way to access request context with Grails, so it is possible to extract any parameter you need, like:
Fortunately, there is easy way to access request context with Grails, so it is possible to extract any parameter you need, like:
import org.springframework.web.context.request.RequestContextHolder
class UserDetailsService implements GrailsUserDetailsService {
UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
def otherParameter = RequestContextHolder.requestAttributes.params.other
...
}
}
Jacket Leather Indonesia
ReplyDeleteCivet Coffee Indonesia
http://bantalsilikon01.blogspot.com/
jual sangkar
jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal jual bantal
cd anne jelita brenda anne caca tasya ruth
bantal web bantal bantal silikon pembicara hellow
bumbu bumbu bumbu bumbu bumbu distro distro
marinirseo
distro
sabunherbal
keset
bantal
seo
distro
marinir
bumbu
I am getting null pointer exception if I use this.
ReplyDeleteVijay Satlawar