Package org.opensaml.security.x509

# Interface X509Credential

All Superinterfaces:
  `Credential`

All Known Implementing Classes:
  `BasicX509Credential`, `KeyStoreX509CredentialAdapter`, `ServletRequestX509CredentialAdapter`, `X509KeyManagerX509CredentialAdapter`

public interface X509Credential extends Credential
An entity credential based on key material and other information (e.g. certificates and certificate revocation lists) associated with X.509 Public Key Infrastructure. Note that this type of credential may not contain a symmetric (secret) key, and hence `Credential.getSecretKey()` should always return null.

## Method Summary

Modifier and Type
Method
Description
`Collection<X509CRL>`
`getCRLs()`
Gets a collection of CRLs associated with the credential.
`X509Certificate`
`getEntityCertificate()`
Gets the public key certificate for the entity.
`Collection<X509Certificate>`
`getEntityCertificateChain()`
Gets an immutable collection of certificates in the entity's trust chain.

### Methods inherited from interface org.opensaml.security.credential.Credential

`getCredentialContextSet, getCredentialType, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageType`

## Method Details

### getEntityCertificate

@Nonnull X509Certificate getEntityCertificate()
Gets the public key certificate for the entity. The public key of this certificate will be the same key obtained from `Credential.getPublicKey()`.

Returns:
  the public key certificate for the entity

### getEntityCertificateChain

@Nonnull @Unmodifiable @NotLive Collection<X509Certificate> getEntityCertificateChain()
Gets an immutable collection of certificates in the entity's trust chain. The entity certificate is contained within this list. No specific ordering of the certificates is guaranteed.

Returns:
  entities certificate chain

### getCRLs

@Nullable @Unmodifiable @NotLive Collection<X509CRL> getCRLs()
Gets a collection of CRLs associated with the credential.

Returns:
  CRLs associated with the credential