class RestAuthX509CallbackHandler extends AbstractRestAuthCallbackHandler<X509CertificateCallback> {

    public JsonValue convertToJson(X509CertificateCallback callback, int index) throws RestAuthException {
        throw new RestAuthException(ResourceException.BAD_REQUEST, new UnsupportedOperationException(
                "X509Certificate must be specified in the initial request. Cannot be converted into a JSON "
                        + "representation."));
    }

}