public abstract class AbstractCredential extends java.lang.Object implements Credential
Credential implementations.| Modifier and Type | Field and Description |
|---|---|
private CredentialContextSet |
credentialContextSet
Credential context of this credential.
|
private java.lang.String |
entityId
ID of the entity owning this credential.
|
private java.util.Collection<java.lang.String> |
keyNames
Key names for this credential.
|
private java.security.PrivateKey |
privateKey
Private key of this credential.
|
private java.security.PublicKey |
publicKey
Public key of this credential.
|
private javax.crypto.SecretKey |
secretKey
Secret key for this credential.
|
private UsageType |
usageType
Usage type of this credential.
|
| Constructor and Description |
|---|
AbstractCredential()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CredentialContextSet |
getCredentialContextSet()
Get the set of credential context information, which provides additional information
specific to the contexts in which the credential was resolved.
|
java.lang.String |
getEntityId()
The unique ID of the entity this credential is for.
|
java.util.Collection<java.lang.String> |
getKeyNames()
Gets key names for this credential.
|
java.security.PrivateKey |
getPrivateKey()
Gets the private key for the entity if there is one.
|
java.security.PublicKey |
getPublicKey()
Gets the public key for the entity.
|
javax.crypto.SecretKey |
getSecretKey()
Gets the secret key for this entity.
|
UsageType |
getUsageType()
Gets usage type of this credential.
|
protected void |
setEntityId(java.lang.String newEntityID)
Sets the ID of the entity this credential is for.
|
protected void |
setPrivateKey(java.security.PrivateKey newPrivateKey)
Sets the private key for this credential.
|
protected void |
setPublicKey(java.security.PublicKey newPublicKey)
Sets the public key for this credential.
|
protected void |
setSecretKey(javax.crypto.SecretKey newSecretKey)
Sets the secret key for this credential.
|
protected void |
setUsageType(UsageType newUsageType)
Sets the usage type for this credential.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCredentialTypeprivate java.lang.String entityId
private UsageType usageType
private java.util.Collection<java.lang.String> keyNames
private java.security.PublicKey publicKey
private javax.crypto.SecretKey secretKey
private java.security.PrivateKey privateKey
private final CredentialContextSet credentialContextSet
@Nullable public java.lang.String getEntityId()
getEntityId in interface Credential@Nullable public UsageType getUsageType()
getUsageType in interface Credential@Nonnull public java.util.Collection<java.lang.String> getKeyNames()
Credential.getPublicKey(), Credential.getPrivateKey()
or Credential.getSecretKey() methods.getKeyNames in interface Credential@Nullable public java.security.PublicKey getPublicKey()
getPublicKey in interface Credential@Nullable public javax.crypto.SecretKey getSecretKey()
getSecretKey in interface Credential@Nullable public java.security.PrivateKey getPrivateKey()
getPrivateKey in interface Credential@Nonnull public CredentialContextSet getCredentialContextSet()
getCredentialContextSet in interface Credentialprotected void setEntityId(@Nullable
java.lang.String newEntityID)
newEntityID - ID of the entity this credential is forprotected void setUsageType(@Nonnull
UsageType newUsageType)
newUsageType - usage type for this credentialprotected void setPublicKey(@Nonnull
java.security.PublicKey newPublicKey)
newPublicKey - public key for this credentialprotected void setPrivateKey(@Nonnull
java.security.PrivateKey newPrivateKey)
newPrivateKey - private key for this credentialprotected void setSecretKey(@Nonnull
javax.crypto.SecretKey newSecretKey)
newSecretKey - secret key for this credential