Package com.onlinepayments.webhooks
Class InMemorySecretKeyStore
java.lang.Object
com.onlinepayments.webhooks.InMemorySecretKeyStore
- All Implemented Interfaces:
SecretKeyStore
An in-memory secret key store.
This implementation can be used in applications where secret keys can be specified at application startup.
Thread-safe.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all stored secret keys.getSecretKey(String keyId) voidremoveSecretKey(String keyId) Removes the secret key for the given key id.voidstoreSecretKey(String keyId, String secretKey) Stores the given secret key for the given key id.
-
Field Details
-
INSTANCE
-
-
Method Details
-
getSecretKey
- Specified by:
getSecretKeyin interfaceSecretKeyStore- Returns:
- The secret key for the given key id. Never
null.
-
storeSecretKey
Stores the given secret key for the given key id. -
removeSecretKey
Removes the secret key for the given key id. -
clear
public void clear()Removes all stored secret keys.
-