Class ApiKey

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.security.apikey.ApiKey
All Implemented Interfaces:
Serializable

public class ApiKey extends PersistentObject
A secret key to use when connecting to the Webservices API
Since:
8.9.4
Author:
Marco Meschieri - LogicalDOC
See Also:
  • Constructor Details

    • ApiKey

      public ApiKey()
    • ApiKey

      public ApiKey(long userId, String name)
  • Method Details

    • getUserId

      public long getUserId()
    • getName

      public String getName()
    • getLastUsed

      public Date getLastUsed()
    • getKey

      public String getKey()
    • setUserId

      public void setUserId(long userId)
    • setName

      public void setName(String name)
    • setLastUsed

      public void setLastUsed(Date lastUsed)
    • setKey

      public void setKey(String key)
    • getDecodedKey

      public String getDecodedKey()
    • setDecodedKey

      public void setDecodedKey(String decodedKey) throws NoSuchAlgorithmException
      Sets the key and encode it
      Parameters:
      decodedKey - The key in readable format
      Throws:
      NoSuchAlgorithmException - Cripting error
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • toString

      public String toString()
      Overrides:
      toString in class PersistentObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PersistentObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class PersistentObject