All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.swak.security.service.SecurityAuthClientService Maven / Gradle / Ivy

The newest version!
package com.swak.security.service;

import com.swak.common.dto.Response;
import com.swak.security.dto.UserAuthInfo;

import java.util.Collections;
import java.util.Set;

public interface SecurityAuthClientService {

    /**
     * 根据用户名查询用户信息
     * @param username
     */
    Response loadUserByUsername(String username);


    Response loadUserById(Long userId);

    /**
     * 根据手机号查询用户信息
     */
    default Response loadUserByMobile(String mobile) {
        return loadUserByUsername(mobile);
    }

    /**
     * 根据用户ID获取权限信息
     */
    default Set getPermission(Long userId) {
        return Collections.emptySet();
    }

    /**
     * 校验手机验证是否正确
     * @param mobile
     * @param smsCode
     */
    default Response verifySmsCode(String mobile, String smsCode) {
        return Response.success();
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy