All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.server.jetty.JettyCertInterceptor Maven / Gradle / Ivy

//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.server.jetty;

import io.deephaven.grpc.AbstractMtlsClientCertificateInterceptor;
import io.grpc.ServerCall;
import io.grpc.servlet.jakarta.GrpcServlet;

import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Optional;

/**
 * Jetty pre-packages the certificates for us, no need to convert them
 */
public class JettyCertInterceptor extends AbstractMtlsClientCertificateInterceptor {
    @Override
    protected  Optional> getTransportCertificates(ServerCall call) {
        return Optional.ofNullable(call.getAttributes().get(GrpcServlet.MTLS_CERTIFICATE_KEY));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy