Package com.aresstack.keepassrpc.pairing
Class DefaultKeePassRpcPairingService
java.lang.Object
com.aresstack.keepassrpc.pairing.DefaultKeePassRpcPairingService
- All Implemented Interfaces:
KeePassRpcPairingService
Default implementation of the UI-independent KeePassRPC pairing service.
The service performs the KeePassRPC SRP setup handshake, keeps the pairing
WebSocket open while the caller obtains the one-time key, and derives the
reusable SRP key returned in KeePassRpcPairingResult. It does not
create dialogs, store settings, or depend on a concrete UI toolkit.
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncompletePairing(KeePassRpcPairingSession session, String pairingKey) Complete an open pairing session using the one-time key displayed by KeePass.pair(KeePassRpcPairingRequest request, KeePassRpcPairingKeyProvider keyProvider) Run the complete pairing flow with an application-provided key callback.startPairing(KeePassRpcPairingRequest request) Start a pairing session and keep the underlying WebSocket open until the caller completes or closes the session.
-
Constructor Details
-
DefaultKeePassRpcPairingService
public DefaultKeePassRpcPairingService() -
DefaultKeePassRpcPairingService
-
-
Method Details
-
startPairing
Description copied from interface:KeePassRpcPairingServiceStart a pairing session and keep the underlying WebSocket open until the caller completes or closes the session.- Specified by:
startPairingin interfaceKeePassRpcPairingService- Parameters:
request- endpoint, origin, client name, and timeout settings- Returns:
- an open pairing session waiting for the one-time key shown by KeePass
-
completePairing
Description copied from interface:KeePassRpcPairingServiceComplete an open pairing session using the one-time key displayed by KeePass.- Specified by:
completePairingin interfaceKeePassRpcPairingService- Parameters:
session- open session returned byKeePassRpcPairingService.startPairing(KeePassRpcPairingRequest)pairingKey- one-time key shown by KeePassRPC- Returns:
- reusable pairing result containing the SRP key to persist
-
pair
public KeePassRpcPairingResult pair(KeePassRpcPairingRequest request, KeePassRpcPairingKeyProvider keyProvider) Description copied from interface:KeePassRpcPairingServiceRun the complete pairing flow with an application-provided key callback.- Specified by:
pairin interfaceKeePassRpcPairingService- Parameters:
request- endpoint, origin, client name, and timeout settingskeyProvider- callback that obtains the one-time key from a UI, CLI, or setup flow- Returns:
- reusable pairing result containing the SRP key to persist
-