package com.njcn.product.auth.service;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2023年06月15日 10:26
 */
public interface CustomUserDetailsService  extends UserDetailsService {

    /**
     * @param username 用户名
     * @return 用户信息
     */
    @Override
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;

    /**
     * @param phone 手机号
     * @return 用户信息
     */
    UserDetails loadUserByPhone(String phone) throws UsernameNotFoundException;

}
