package com.purui.prims.auth.api.authentication.adaptor;

import com.purui.prims.auth.api.authentication.pojo.User;
import com.purui.prims.auth.api.authentication.request.UserReq;
import com.purui.prims.auth.api.authentication.response.RoleResp;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Set;

/**
 * UserAdaptor defines some interfaces for obtaining user and organization information
 */
public interface UserAdaptor {

    List<String> getUserNames();

    List<User> getUserList();

    List<RoleResp> getRoles();

    void register(UserReq userReq);

    void update(UserReq userReq);

    String login(UserReq userReq, HttpServletRequest request);

    String login(UserReq userReq, String appKey);

    List<User> getUserByOrg(String key);

    Set<String> getUserAllOrgId(String userName);
}
