Class InMemorySecretKeyStore

java.lang.Object
com.onlinepayments.webhooks.InMemorySecretKeyStore
All Implemented Interfaces:
SecretKeyStore

public final class InMemorySecretKeyStore extends Object implements 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 Details

  • Method Details

    • getSecretKey

      public String getSecretKey(String keyId)
      Specified by:
      getSecretKey in interface SecretKeyStore
      Returns:
      The secret key for the given key id. Never null.
    • storeSecretKey

      public void storeSecretKey(String keyId, String secretKey)
      Stores the given secret key for the given key id.
    • removeSecretKey

      public void removeSecretKey(String keyId)
      Removes the secret key for the given key id.
    • clear

      public void clear()
      Removes all stored secret keys.