Spring Security Custom Userservice, You can define custom authentication by exposing a custom UserDetailsService as a bean.