Interface CertificateTrustPromptBean

All Superinterfaces:
Serializable
All Known Implementing Classes:
CertificateTrustPromptBeanImpl

public interface CertificateTrustPromptBean extends Serializable
A bean interface for handling certificate trust prompts in a JavaServer Faces (JSF) application. This interface provides methods to test connections. If the trust validation fails, it shows a trust prompt dialog to the user, allowing them to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.

Note: For the trust prompt dialog to work correctly, the trustPromptDialog.xhtml must be included in the view.

Since:
16.09.25
Author:
Norman Lorenz
  • Method Details

    • openDialog

      Opens the trust prompt dialog for the specified key store scope and certificate chain. This method can be used to manually trigger the trust prompt dialog for a given set of certificates. The dialog allows the user to review the certificates and decide whether to trust them by importing them into a key store.
      Parameters:
      params - The parameters for opening the trust prompt dialog, including the certificate chain, key store scope, and an optional preselected key store selector.
      Throws:
      FcCertificateManagementException - If an error occurs while opening the dialog.
    • testConnection

      boolean testConnection(SocketConnectionTestParams params)
      Tests the connection with the provided socket connection test parameters. The connection test is performed on the specified host and port using the provided key store scope.
      Parameters:
      params - The parameters for testing the socket connection, including host, port, key store scope, and import result callback.
      Returns:
      true if the connection test is successful and trust validation passes, otherwise false. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.
    • testConnection

      boolean testConnection(SslConnectionTestParams params)
      Tests the connection with the provided SSL connection test parameters. The connection test is determined by the caller of this method, which can use the provided SSLContext to establish a connection.
      Parameters:
      params - The parameters for testing the SSL connection, including the SSLContext consumer, key store scope, and import result callback.
      Returns:
      true if the connection test is successful and trust validation passes, otherwise false. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.