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.xhtmlmust be included in the view.- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidopenDialog(OpenTrustPromptDialogParams params)Opens the trust prompt dialog for the specified key store scope and certificate chain.booleantestConnection(SocketConnectionTestParams params)Tests the connection with the provided socket connection test parameters.booleantestConnection(SslConnectionTestParams params)Tests the connection with the provided SSL connection test parameters.
-
-
-
Method Detail
-
openDialog
void openDialog(OpenTrustPromptDialogParams params) throws FcCertificateManagementException
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:
trueif the connection test is successful and trust validation passes, otherwisefalse. 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:
trueif the connection test is successful and trust validation passes, otherwisefalse. 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.
-
-