Search in sources :

Example 1 with CheckServiceAccessRequest

use of org.platformlayer.auth.v1.CheckServiceAccessRequest in project platformlayer by platformlayer.

the class PlatformLayerAuthAdminClient method checkServiceAccess.

public String checkServiceAccess(CertificateChainInfo chain) {
    String url = "services/check";
    CheckServiceAccessRequest request = new CheckServiceAccessRequest();
    request.setChain(chain);
    try {
        CheckServiceAccessResponse response = doSimpleXmlRequest(HttpMethod.POST, url, request, CheckServiceAccessResponse.class);
        return response.getServiceAccount();
    } catch (RestClientException e) {
        throw new IllegalArgumentException("Error while checking service access", e);
    }
}
Also used : CheckServiceAccessRequest(org.platformlayer.auth.v1.CheckServiceAccessRequest) RestClientException(org.platformlayer.rest.RestClientException) CheckServiceAccessResponse(org.platformlayer.auth.v1.CheckServiceAccessResponse)

Aggregations

CheckServiceAccessRequest (org.platformlayer.auth.v1.CheckServiceAccessRequest)1 CheckServiceAccessResponse (org.platformlayer.auth.v1.CheckServiceAccessResponse)1 RestClientException (org.platformlayer.rest.RestClientException)1