package cn.mb.cloud.auth.service;
|
|
import cn.mb.cloud.auth.warpper.GetTokenRequest;
|
import cn.mb.cloud.auth.warpper.RefreshTokenRequest;
|
import cn.mb.cloud.auth.warpper.TokenResponse;
|
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
public interface IUserDetailsService extends UserDetailsService {
|
|
|
/**
|
* 重写方法
|
* @param username
|
* @return
|
* @throws UsernameNotFoundException
|
*/
|
UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;
|
|
|
/**
|
* 获取用户端token
|
* @return request
|
* @throws Exception
|
*/
|
TokenResponse getToken(GetTokenRequest request) throws Exception;
|
|
|
/**
|
* 刷新令牌
|
* @param request
|
* @return
|
* @throws Exception
|
*/
|
TokenResponse refreshToken(RefreshTokenRequest request) throws Exception;
|
}
|