use of uk.gov.ida.hub.policy.domain.ResourceLocation in project verify-hub by alphagov.
the class ConfigStubRule method setUpStubForAssertionConsumerServiceUri.
public void setUpStubForAssertionConsumerServiceUri(String entityId, Optional<Integer> assertionConsumerServiceIndex) throws JsonProcessingException {
UriBuilder uriBuilder = UriBuilder.fromPath(Urls.ConfigUrls.TRANSACTIONS_ASSERTION_CONSUMER_SERVICE_URI_RESOURCE);
if (assertionConsumerServiceIndex.isPresent()) {
uriBuilder.queryParam(Urls.ConfigUrls.ASSERTION_CONSUMER_SERVICE_INDEX_PARAM, assertionConsumerServiceIndex.get().toString());
}
URI uri = uriBuilder.buildFromEncoded(StringEncoding.urlEncode(entityId).replace("+", "%20"));
register(uri.toString(), OK, new ResourceLocation(URI.create("thisIsAnRpPostEndpointUri")));
}
Aggregations