- All Known Subinterfaces:
- All Known Implementing Classes:
public interface Credential
A credential for an entity. A particular credential may contain either asymmetric key information (a public key and optionally the corresponding private key), or a symmetric (secret) key, but never both. With asymmetric key-based credentials, local entity credentials will usually contain both a public and private key while peer credentials will normally contain only a public key.
Method SummaryModifier and TypeMethodDescriptionGet the set of credential context information, which provides additional information specific to the contexts in which the credential was resolved.
Class<? extends Credential>Get the primary type of the credential instance.The unique ID of the entity this credential is for.Gets key names for this credential.Gets the private key for the entity if there is one.Gets the public key for the entity.Gets the secret key for this entity.Gets usage type of this credential.
getEntityId@Nullable String getEntityId()The unique ID of the entity this credential is for.
- unique ID of the entity this credential is for
getUsageType@Nullable UsageType getUsageType()Gets usage type of this credential.
- usage type of this credential
getKeyNames@Nonnull Collection<String> getKeyNames()Gets key names for this credential. These names may be used to reference a key(s) exchanged through an out-of-band agreement. Implementations may or may not implement means to resolve these names into keys retrievable through the
- key names for this credential
getPublicKey@Nullable PublicKey getPublicKey()Gets the public key for the entity.
- public key for the entity
getPrivateKey@Nullable PrivateKey getPrivateKey()Gets the private key for the entity if there is one.
- the private key for the entity
getSecretKey@Nullable SecretKey getSecretKey()Gets the secret key for this entity.
- secret key for this entity
getCredentialContextSet@Nullable CredentialContextSet getCredentialContextSet()Get the set of credential context information, which provides additional information specific to the contexts in which the credential was resolved.
- set of resolution contexts of the credential
getCredentialType@Nonnull Class<? extends Credential> getCredentialType()Get the primary type of the credential instance. This will usually be the primary sub-interface of
Credentialimplemented by an implementation.
- the credential type