function authorizeWithCertificate(clusterID, clusterCert)
% Authorize to access a cluster by using an SSL certificate.

%   Copyright 2020 The MathWorks, Inc.

cloudCenterClient = parallel.internal.cloud.currentCloudCenterClient();
getNonceAndAuthorizeFcn = @() cloudCenterClient.getNonceAndAuthorize(clusterID, clusterCert);
responseWithMessages = parallel.internal.mwa.invokeWithLogin(getNonceAndAuthorizeFcn);
parallel.internal.cloud.checkAndIssueWebServiceWarnings(responseWithMessages);
end