package com.philisense.www.service;

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

import java.util.Map;
import java.util.Set;

public interface JwtUserDetailsService extends UserDetailsService {

    /**
     * 手机号登录
     * @param phone
     * @return
     */
    UserDetails loadUserByPhone(String phone);

    /**
     * 邮箱登录
     * @param email
     * @return
     */
    UserDetails loadUserByEmail(String email);

    /**
     * 用户名Id登录
     * @param userid
     * @return
     */
    @Deprecated
    UserDetails loadUserById(String userid);

    /**
     * 根据用户id查询角色信息
     * @param userid
     * @return
     */
    public Set<Map<String,Object>> getAuthoritiesNoGroupByUserId(String userid);
}
