org.opensaml.xml.security.x509
Class BasicX509Credential

java.lang.Object
  extended by org.opensaml.xml.security.credential.AbstractCredential
      extended by org.opensaml.xml.security.credential.BasicCredential
          extended by org.opensaml.xml.security.x509.BasicX509Credential
All Implemented Interfaces:
Credential, X509Credential

public class BasicX509Credential
extends BasicCredential
implements X509Credential

A basic implementation of X509Credential.


Field Summary
private  Collection<X509CRL> crls
          CRLs for this credential.
private  X509Certificate entityCert
          Entity certificate.
private  Collection<X509Certificate> entityCertChain
          Entity certificate chain, must include entity certificate.
 
Fields inherited from class org.opensaml.xml.security.credential.AbstractCredential
credentialContextSet, entityID, keyNames, privateKey, publicKey, secretKey, usageType
 
Constructor Summary
BasicX509Credential()
           
 
Method Summary
 Class<? extends Credential> getCredentialType()
          Get the primary type of the credential instance.
 Collection<X509CRL> getCRLs()
          Gets a collection of CRLs associated with the credential.
 X509Certificate getEntityCertificate()
          Gets the public certificate for the entity.
 Collection<X509Certificate> getEntityCertificateChain()
          Gets an immutable collection of certificates in the entity's trust chain.
 SecretKey getSecretKey()
          Gets the secret key for this entity.
 void setCRLs(Collection<X509CRL> newCRLs)
          Sets the CRLs for this credential.
 void setEntityCertificate(X509Certificate cert)
          Sets the entity certificate for this credential.
 void setEntityCertificateChain(Collection<X509Certificate> certs)
          Sets the entity certificate chain for this credential.
 void setPublicKey(PublicKey key)
          Sets the public key for this credential.
 void setSecretKey(SecretKey key)
          Sets the secret key for this credential.
 
Methods inherited from class org.opensaml.xml.security.credential.BasicCredential
setEntityId, setPrivateKey, setUsageType
 
Methods inherited from class org.opensaml.xml.security.credential.AbstractCredential
getCredentalContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getUsageType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.xml.security.credential.Credential
getCredentalContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getUsageType
 

Field Detail

entityCert

private X509Certificate entityCert
Entity certificate.


entityCertChain

private Collection<X509Certificate> entityCertChain
Entity certificate chain, must include entity certificate.


crls

private Collection<X509CRL> crls
CRLs for this credential.

Constructor Detail

BasicX509Credential

public BasicX509Credential()
Method Detail

getCredentialType

public Class<? extends Credential> getCredentialType()
Get the primary type of the credential instance. This will usually be the primary sub-interface of Credential implemented by an implementation.

Specified by:
getCredentialType in interface Credential
Overrides:
getCredentialType in class BasicCredential
Returns:
the credential type

getCRLs

public Collection<X509CRL> getCRLs()
Gets a collection of CRLs associated with the credential.

Specified by:
getCRLs in interface X509Credential
Returns:
CRLs associated with the credential

setCRLs

public void setCRLs(Collection<X509CRL> newCRLs)
Sets the CRLs for this credential.

Parameters:
newCRLs - CRLs for this credential

getEntityCertificate

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

Specified by:
getEntityCertificate in interface X509Credential
Returns:
the public certificate for the entity

setEntityCertificate

public void setEntityCertificate(X509Certificate cert)
Sets the entity certificate for this credential.

Parameters:
cert - entity certificate for this credential

getEntityCertificateChain

public 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.

Specified by:
getEntityCertificateChain in interface X509Credential
Returns:
entities certificate chain

setEntityCertificateChain

public void setEntityCertificateChain(Collection<X509Certificate> certs)
Sets the entity certificate chain for this credential. This MUST include the entity certificate.

Parameters:
certs - ntity certificate chain for this credential

setPublicKey

public void setPublicKey(PublicKey key)
Sets the public key for this credential.

Overrides:
setPublicKey in class BasicCredential
Parameters:
key - public key for this credential

setSecretKey

public void setSecretKey(SecretKey key)
Sets the secret key for this credential.

Overrides:
setSecretKey in class BasicCredential
Parameters:
key - secret key for this credential

getSecretKey

public SecretKey getSecretKey()
Gets the secret key for this entity.

Specified by:
getSecretKey in interface Credential
Overrides:
getSecretKey in class AbstractCredential
Returns:
secret key for this entity


Copyright © 1999-2012. All Rights Reserved.