Package org.icij.datashare.user
Class DatashareApiKey
- java.lang.Object
-
- org.icij.datashare.user.DatashareApiKey
-
- All Implemented Interfaces:
Serializable,Entity,ApiKey
public class DatashareApiKey extends Object implements ApiKey
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DatashareApiKey(String hashedKey, User user)DatashareApiKey(String hashedKey, User user, Date creationDate)DatashareApiKey(SecretKey secretKey, User user)DatashareApiKey(User user)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static SecretKeygenerateSecretKey()static StringgetBase64Encoded(SecretKey secretKey)DategetCreationDate()StringgetId()UsergetUser()inthashCode()booleanmatch(String base64Key)
-
-
-
Field Detail
-
ALGORITHM
public static final String ALGORITHM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DatashareApiKey
public DatashareApiKey(User user) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
-
Method Detail
-
generateSecretKey
public static SecretKey generateSecretKey() throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
getCreationDate
public Date getCreationDate()
- Specified by:
getCreationDatein interfaceApiKey
-
-