Interface KeyStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteKeys​(java.lang.String memberId)
      Deletes keys for a specific member.
      SecretKey getById​(java.lang.String memberId, java.lang.String keyId)
      Gets a key by its ID.
      SecretKey getByLevel​(java.lang.String memberId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Gets a key by its level.
      java.util.List<SecretKey> listKeys​(java.lang.String memberId)
      Gets all of a member's keys.
      void put​(java.lang.String memberId, SecretKey key)
      Puts a specified key into the storage.
    • Method Detail

      • put

        void put​(java.lang.String memberId,
                 SecretKey key)
        Puts a specified key into the storage.
        Parameters:
        memberId - member ID
        key - key to put into the storage
        Throws:
        KeyIOException - if an error is encountered while storing the key
      • getByLevel

        SecretKey getByLevel​(java.lang.String memberId,
                             io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Gets a key by its level.
        Parameters:
        memberId - member ID
        keyLevel - SecurityProtos.Key.Level of the key to get
        Returns:
        secret key
        Throws:
        KeyIOException - if an error is encountered while fetching the key
      • getById

        SecretKey getById​(java.lang.String memberId,
                          java.lang.String keyId)
        Gets a key by its ID.
        Parameters:
        memberId - member ID
        keyId - key ID to get
        Returns:
        secret key
        Throws:
        KeyIOException - if an error is encountered while fetching the key
      • listKeys

        java.util.List<SecretKey> listKeys​(java.lang.String memberId)
        Gets all of a member's keys.
        Parameters:
        memberId - Id of member
        Returns:
        list of SecretKey
      • deleteKeys

        void deleteKeys​(java.lang.String memberId)
        Deletes keys for a specific member.
        Parameters:
        memberId - Id of member