class IngOauth2Service {

    public URI getAuthorizationRequestUri(Oauth2Service.Parameters parameters)  {
        requireValid(validateScope(parameters.getScope()));
        parameters.setScope(mapScope(parameters.getScope()));

        IngClientAuthentication clientAuthentication = getClientAuthentication();
        IngAuthorizationURLResponse authorizationUrlResponse =
            oauth2Api.getAuthorizationUrl(clientAuthentication,
                parameters.getScope(),
                parameters.getRedirectUri())
            .getBody();

        parameters.setClientId(getClientId());
        parameters.setResponseType(CODE.toString());

        return URI.create(StringUri.withQuery(authorizationUrlResponse.getLocation(), parameters.asMap()));
    }

    public  IngOauth2Service(IngOauth2Api oauth2Api,
                            IngClientAuthenticationFactory clientAuthenticationFactory);

}