public class BasicCredential extends AbstractCredential implements MutableCredential
Credential.| Modifier | Constructor and Description |
|---|---|
protected |
BasicCredential()
Constructor.
|
|
BasicCredential(java.security.PublicKey publicKey)
Constructor.
|
|
BasicCredential(java.security.PublicKey publicKey,
java.security.PrivateKey privateKey)
Constructor.
|
|
BasicCredential(javax.crypto.SecretKey secretKey)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<? extends Credential> |
getCredentialType()
Get the primary type of the credential instance.
|
void |
setEntityId(java.lang.String newEntityId)
Sets the ID of the entity this credential is for.
|
void |
setPrivateKey(java.security.PrivateKey newPrivateKey)
Sets the private key for this credential.
|
void |
setPublicKey(java.security.PublicKey newPublicKey)
Sets the public key for this credential.
|
void |
setSecretKey(javax.crypto.SecretKey newSecretKey)
Sets the secret key for this credential.
|
void |
setUsageType(UsageType newUsageType)
Sets the usage type for this credential.
|
getCredentialContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCredentialContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageTypepublic BasicCredential(@Nonnull
java.security.PublicKey publicKey)
publicKey - the credential public keypublic BasicCredential(@Nonnull
java.security.PublicKey publicKey,
@Nullable
java.security.PrivateKey privateKey)
publicKey - the credential public keyprivateKey - the credential private keypublic BasicCredential(@Nonnull
javax.crypto.SecretKey secretKey)
secretKey - the credential secret keyprotected BasicCredential()
public java.lang.Class<? extends Credential> getCredentialType()
Credential implemented by an implementation.getCredentialType in interface Credentialpublic void setEntityId(@Nullable
java.lang.String newEntityId)
setEntityId in interface MutableCredentialsetEntityId in class AbstractCredentialnewEntityId - ID of the entity this credential is forpublic void setUsageType(@Nonnull
UsageType newUsageType)
setUsageType in interface MutableCredentialsetUsageType in class AbstractCredentialnewUsageType - usage type for this credentialpublic void setPublicKey(@Nonnull
java.security.PublicKey newPublicKey)
setPublicKey in interface MutableCredentialsetPublicKey in class AbstractCredentialnewPublicKey - public key for this credentialpublic void setPrivateKey(@Nonnull
java.security.PrivateKey newPrivateKey)
setPrivateKey in interface MutableCredentialsetPrivateKey in class AbstractCredentialnewPrivateKey - private key for this credentialpublic void setSecretKey(@Nonnull
javax.crypto.SecretKey newSecretKey)
setSecretKey in interface MutableCredentialsetSecretKey in class AbstractCredentialnewSecretKey - secret key for this credential