spring-attic / spring-security-oauth

Support for adding OAuth1(a) and OAuth2 features (consumer and provider) for Spring web applications.

Home Page:http://github.com/spring-projects/spring-security-oauth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom JdbcClientDetailsService throws exception StackOverflowError

moil-xm opened this issue · comments

Actual Behavior

Request the API as follows
/oauth/authorize?response_type=code&client_id=client_id
will throw StackOverflowError

    @Resource
    private ClientDetailsService clientDetailsService;
    @Bean
    public JdbcClientDetailsService jdbcClientDetailsService(DataSource dataSource) {
        JdbcClientDetailsService jdbcClientDetailsService = new JdbcClientDetailsService(dataSource);
        jdbcClientDetailsService.setPasswordEncoder(passwordEncoder);
        return jdbcClientDetailsService;
    }
    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.withClientDetails(clientDetailsService);
            .passwordEncoder(passwordEncoder);
    }

This can be requested normally

    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.jdbc(dataSource)
            .passwordEncoder(passwordEncoder);
    }

Expected Behavior

Both methods can be used normally

Version

current 2.3.4.RELEASE, 2.5.0..RELEASE This problem also occurs  

Sample