Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

Custom JdbcClientDetailsService throws exception StackOverflowError #1949

Open
moil-xm opened this issue Feb 20, 2022 · 0 comments
Open

Custom JdbcClientDetailsService throws exception StackOverflowError #1949

moil-xm opened this issue Feb 20, 2022 · 0 comments

Comments

@moil-xm
Copy link

moil-xm commented Feb 20, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants