Package com.aresstack.keepassrpc.pairing
Interface KeePassRpcPairingService
- All Known Implementing Classes:
DefaultKeePassRpcPairingService
public interface KeePassRpcPairingService
UI-independent use case for pairing a Java application with KeePassRPC.
Implementations open a KeePassRPC WebSocket connection, perform the initial SRP identification step, wait for the user-visible one-time pairing key, and return the SRP key that the application must persist for future authenticated requests.
-
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.
-
Method Details
-
startPairing
Start a pairing session and keep the underlying WebSocket open until the caller completes or closes the session.- Parameters:
request- endpoint, origin, client name, and timeout settings- Returns:
- an open pairing session waiting for the one-time key shown by KeePass
- Throws:
KeePassRpcPairingException- if KeePassRPC is not reachable or rejects the request
-
completePairing
Complete an open pairing session using the one-time key displayed by KeePass.- Parameters:
session- open session returned bystartPairing(KeePassRpcPairingRequest)pairingKey- one-time key shown by KeePassRPC- Returns:
- reusable pairing result containing the SRP key to persist
- Throws:
KeePassRpcPairingException- if the key is invalid or the protocol exchange fails
-
pair
KeePassRpcPairingResult pair(KeePassRpcPairingRequest request, KeePassRpcPairingKeyProvider keyProvider) Run the complete pairing flow with an application-provided key callback.- 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
-