eleme.openapi.sdk.oauth.request.ClientTokenRequest Maven / Gradle / Ivy
package eleme.openapi.sdk.oauth.request;
import eleme.openapi.sdk.config.Config;
import eleme.openapi.sdk.config.Constants;
import eleme.openapi.sdk.oauth.BaseOAuthRequest;
import eleme.openapi.sdk.oauth.response.Token;
import java.util.Map;
public class ClientTokenRequest extends BaseOAuthRequest {
private Config context;
public ClientTokenRequest(Config context) {
this.context = context;
}
public Class getResponseClass() {
return Token.class;
}
public Map getHeaderMap() {
setAuthorization(context.getApp_key(), context.getApp_secret(), Constants.TOKEN_SIGN);
return super.headerMap;
}
public Map getBodyMap() {
putBodyParam("grant_type", "client_credentials");
return super.bodyMap;
}
public Map getBodyMap(String appKey) {
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy