package cn.reghao.tnb.auth.app.service.impl;

import cn.reghao.tnb.auth.app.db.mapper.oauth.ClientDetailsMapper;
import cn.reghao.tnb.auth.app.model.po.oauth.ClientDetails;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * @author reghao
 * @date 2024-11-19 14:53:29
 */
//@Service("oAuth2UserDetailsService")
public class OAuth2UserDetailsService implements UserDetailsService {
    private final ClientDetailsMapper clientDetailsMapper;

    public OAuth2UserDetailsService(ClientDetailsMapper clientDetailsMapper) {
        this.clientDetailsMapper = clientDetailsMapper;
    }

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        ClientDetails clientDetails = clientDetailsMapper.findByClientId(username);
        return null;
    }
}
