class DkbServiceProvider implements AccountInformationServiceProvider, PaymentInitiationServiceProvider {

    @Override
    public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
                                                                HttpClientFactory httpClientFactory,
                                                                Pkcs12KeyStore keyStore,
                                                                LinksRewriter linksRewriter) {
        HttpClient httpClient = httpClientFactory.getHttpClient(getAdapterId());
        DkbAccessTokenService tokenService = DkbAccessTokenService.getInstance();
        tokenService.setHttpClient(httpClient);
        return new DkbPaymentInitiationService(aspsp, tokenService, httpClient, linksRewriter);
    }

}