use of com.forgerock.openbanking.model.oidc.OIDCRegistrationResponse in project openbanking-aspsp by OpenBankingToolkit.
the class AspspApiClientImpl method onboard.
@Override
public OIDCRegistrationResponse onboard(RestTemplate restTemplate, String onboardingEndpoint, String registrationRequestJwtSerialised) {
ParameterizedTypeReference<OIDCRegistrationResponse> ptr = new ParameterizedTypeReference<OIDCRegistrationResponse>() {
};
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(onboardingEndpoint);
URI uri = builder.build().encode().toUri();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.valueOf("application/jwt"));
HttpEntity<String> request = new HttpEntity<>(registrationRequestJwtSerialised, headers);
LOGGER.debug("Onboard software state on endpoint {}", onboardingEndpoint);
return restTemplate.exchange(uri, HttpMethod.POST, request, ptr).getBody();
}
use of com.forgerock.openbanking.model.oidc.OIDCRegistrationResponse in project openbanking-aspsp by OpenBankingToolkit.
the class AspspApiClientImpl method getOnboardingResult.
@Override
public OIDCRegistrationResponse getOnboardingResult(RestTemplate restTemplate, String onboardingEndpoint) {
ParameterizedTypeReference<OIDCRegistrationResponse> ptr = new ParameterizedTypeReference<OIDCRegistrationResponse>() {
};
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(onboardingEndpoint);
URI uri = builder.build().encode().toUri();
LOGGER.debug("Get onboard result from enpoint {}", onboardingEndpoint);
return restTemplate.exchange(uri, HttpMethod.GET, null, ptr).getBody();
}
Aggregations