org.opensaml.xml.security.credential
Class AbstractCredential

java.lang.Object
  extended by org.opensaml.xml.security.credential.AbstractCredential
All Implemented Interfaces:
Credential
Direct Known Subclasses:
BasicCredential

public abstract class AbstractCredential
extends Object
implements Credential

Base class for Credential implementations.


Field Summary
protected  CredentialContextSet credentialContextSet
          Credential context of this credential.
protected  String entityID
          ID of the entity owning this credential.
protected  Collection<String> keyNames
          Key names for this credential.
protected  PrivateKey privateKey
          Private key of this credential.
protected  PublicKey publicKey
          Public key of this credential.
protected  SecretKey secretKey
          Secret key for this credential.
protected  UsageType usageType
          Usage type of this credential.
 
Constructor Summary
AbstractCredential()
          Constructor.
 
Method Summary
 CredentialContextSet getCredentalContextSet()
          Get the set of credential context information, which provides additional information specific to the contexts in which the credential was resolved.
 String getEntityId()
          The unique ID of the entity this credential is for.
 Collection<String> getKeyNames()
          Gets key names for this credential.
 PrivateKey getPrivateKey()
          Gets the private key for the entity if there is one.
 PublicKey getPublicKey()
          Gets the public key for the entity.
 SecretKey getSecretKey()
          Gets the secret key for this entity.
 UsageType getUsageType()
          Gets usage type of this credential.
 
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
getCredentialType
 

Field Detail

entityID

protected String entityID
ID of the entity owning this credential.


usageType

protected UsageType usageType
Usage type of this credential.


keyNames

protected Collection<String> keyNames
Key names for this credential.


publicKey

protected PublicKey publicKey
Public key of this credential.


secretKey

protected SecretKey secretKey
Secret key for this credential.


privateKey

protected PrivateKey privateKey
Private key of this credential.


credentialContextSet

protected final CredentialContextSet credentialContextSet
Credential context of this credential.

Constructor Detail

AbstractCredential

public AbstractCredential()
Constructor.

Method Detail

getEntityId

public String getEntityId()
The unique ID of the entity this credential is for.

Specified by:
getEntityId in interface Credential
Returns:
unique ID of the entity this credential is for

getUsageType

public UsageType getUsageType()
Gets usage type of this credential.

Specified by:
getUsageType in interface Credential
Returns:
usage type of this credential

getKeyNames

public 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 aggreement. Implementations may or may not implement means to resolve these names into keys retrievable through the Credential.getPublicKey(), Credential.getPrivateKey() or Credential.getSecretKey() methods.

Specified by:
getKeyNames in interface Credential
Returns:
key names for this credential

getPublicKey

public PublicKey getPublicKey()
Gets the public key for the entity.

Specified by:
getPublicKey in interface Credential
Returns:
public key for the entity

getSecretKey

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

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

getPrivateKey

public PrivateKey getPrivateKey()
Gets the private key for the entity if there is one.

Specified by:
getPrivateKey in interface Credential
Returns:
the private key for the entity

getCredentalContextSet

public CredentialContextSet getCredentalContextSet()
Get the set of credential context information, which provides additional information specific to the contexts in which the credential was resolved.

Specified by:
getCredentalContextSet in interface Credential
Returns:
set of resolution contexts of the credential


Copyright © 1999-2013. All Rights Reserved.