package org.oauth2.client4j.builder.provider;
import org.oauth2.client4j.common.OAuth;
import org.oauth2.client4j.http.response.JSONAccessTokenResponse;
import org.oauth2.client4j.http.response.OAuthResponse;
import org.oauth2.client4j.model.OAuthConfig;
import org.oauth2.client4j.service.OAuthService;
import org.oauth2.client4j.service.OAuthServiceImpl;
public abstract class Provider {
public abstract String getAccessTokenEndpoint();
public abstract String getAuthorizationEndpoint();
public Class<? extends OAuthResponse> getAccessTokenResponseClass(){
return JSONAccessTokenResponse.class;
}
public String getAccessTokenRequestType() {
return OAuth.HttpMethod.POST;
}
public String getAuthorRequestType() {
return OAuth.HttpMethod.GET;
}
public OAuthService createService(OAuthConfig oAuthConfig) {
return new OAuthServiceImpl(this, oAuthConfig);
}
}