class BaseOauth2Service implements Oauth2Service {

    @Override
    public TokenResponse getToken(Map<String, String> headers, Parameters parameters) throws IOException {

        Response<TokenResponse> response = httpClient.post(getTokenEndpoint(parameters))
            .urlEncodedBody(parameters.asMap())
            .send(jsonResponseHandler(TokenResponse.class));
        return response.getBody();
    }

    public  BaseOauth2Service(Aspsp aspsp, HttpClient httpClient);

}