package ink.wgink.module.oauth2.remote;

import com.alibaba.fastjson.JSONObject;
import ink.wgink.annotation.rpc.rest.RemoteService;
import ink.wgink.annotation.rpc.rest.method.RemotePostMethod;
import ink.wgink.annotation.rpc.rest.params.RemoteFormParams;
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IAccessTokenRemoteService
 * @Description: accessToken
 * @Author: WangGeng
 * @Date: 2021/9/21 12:44
 * @Version: 1.0
 **/
@RemoteService
public interface IAccessTokenRemoteService {

    @RemotePostMethod("/oauth2_client/token")
    JSONObject getAccessToken(@RemoteServerParams String server,
                              @RemoteFormParams("grant_type") String grantType,
                              @RemoteFormParams("client_id") String clientId,
                              @RemoteFormParams("client_secret") String clientSecret,
                              @RemoteFormParams("scope") String scope);

}
