Interface ReloadablePkiCredential
- All Superinterfaces:
DisposableBean
,InitializingBean
,PkiCredential
- All Known Implementing Classes:
AbstractReloadablePkiCredential
,KeyStoreCredential
,Pkcs11Credential
An interface for credentials are "testable" and "reloadable".
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionA credential may be monitored to ensure that it is functional.void
reload()
Some implementations of key pairs, such as HSM-based, may need to be reloaded.Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
Methods inherited from interface se.swedenconnect.security.credential.PkiCredential
getCertificate, getCertificateChain, getName, getPrivateKey, getPublicKey, init, isHardwareCredential, setCertificate, setCertificateChain
-
Method Details
-
getTestFunction
A credential may be monitored to ensure that it is functional. This can be useful when using for example credentials residing on hardware devices where the connection may be lost. If a credential implementation should be "testable" it must return a function for testing itself. This function (Supplier
) returns anException
for test failures andnull
for success.A credential that returns a function should also implement the
reload()
method.- Returns:
- a function for testing the credential, or null if no test function is available
-
reload
Some implementations of key pairs, such as HSM-based, may need to be reloaded. This is done by implementing this method.- Throws:
Exception
- for reloading errors
-