zhongrj
2024-04-27 7e82c16716481ee185330c63535936af6ff6af79
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package org.springblade.auth.service;
 
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
import org.springframework.stereotype.Component;
 
import javax.sql.DataSource;
 
/**
 * 客户端信息
 *
 * @author Chill
 */
@Component
public class BladeClientDetailsServiceImpl extends JdbcClientDetailsService {
 
    public BladeClientDetailsServiceImpl(DataSource dataSource) {
        super(dataSource);
    }
 
    /**
     * 缓存客户端信息
     *
     * @param clientId 客户端id
     */
    @Override
    public ClientDetails loadClientByClientId(String clientId) {
        try {
            return super.loadClientByClientId(clientId);
        } catch (Exception ex) {
            ex.printStackTrace();
            return null;
        }
    }
}