i'm fairly new to spring oauth2. I was wondering if it was possible to attached custom userdetails on the oauth client side.
something like this
@EnableOAuth2Sso
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
@Qualifier("customUserDetailsService")
private UserDetailsService userDetailsService;
@Override
public void configure(HttpSecurity http) throws Exception {
http
.antMatcher("/**")
.authorizeRequests()
.antMatchers("/", "/login**")
.permitAll()
.anyRequest()
.authenticated();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService);
}
}
this does not work as the configuration is somehow ignored.
this client authenticated in a spring oauth2 authentication server successfully, but i want to load the other user details after obtaining authorization.