Class MultipeerCertificateAuthenticator

java.lang.Object
com.couchbase.lite.internal.core.BaseMultipeerCertificateAuthenticator
com.couchbase.lite.MultipeerCertificateAuthenticator
All Implemented Interfaces:
MultipeerAuthenticator

public final class MultipeerCertificateAuthenticator extends com.couchbase.lite.internal.core.BaseMultipeerCertificateAuthenticator
The authenticator authenticates the peer by verifying the peer’s certificate.
  • Constructor Details

    • MultipeerCertificateAuthenticator

      public MultipeerCertificateAuthenticator(@NonNull List<X509Certificate> rootCerts)
      Initialize with the root certificates to trust.
      Parameters:
      rootCerts - certificate chain to use for authentication.
    • MultipeerCertificateAuthenticator

      public MultipeerCertificateAuthenticator(@NonNull MultipeerCertificateAuthenticator.AuthenticationDelegate delegate)
      Initialize with an authenticator for verifying the received certificate chain.
      Parameters:
      delegate - The delegate to use for authentication.
  • Method Details

    • authenticate

      protected boolean authenticate(@NonNull PeerInfo.PeerId peer, @NonNull List<X509Certificate> certs)
      Authenticates the peer certificates.
      Specified by:
      authenticate in class com.couchbase.lite.internal.core.BaseMultipeerCertificateAuthenticator
      Parameters:
      peer - The peer ID.
      certs - certs to be authenticated
      Returns:
      true if the authentication is successful, false otherwise.