XMLTooling-J 1.3.2-redhat-4

org.opensaml.xml.security.credential
Interface Credential

All Known Subinterfaces:
X509Credential
All Known Implementing Classes:
AbstractCredential, BasicCredential, BasicX509Credential, KeyStoreX509CredentialAdapter, X509KeyManagerX509CredentialAdapter

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 credentails will normally contain only a public key.


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.
 Class<? extends Credential> getCredentialType()
          Get the primary type of the credential instance.
 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.
 

Method Detail

getEntityId

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

Returns:
unique ID of the entity this credential is for

getUsageType

UsageType getUsageType()
Gets usage type of this credential.

Returns:
usage type of this credential

getKeyNames

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 getPublicKey(), getPrivateKey() or getSecretKey() methods.

Returns:
key names for this credential

getPublicKey

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

Returns:
public key for the entity

getPrivateKey

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

Returns:
the private key for the entity

getSecretKey

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

Returns:
secret key for this entity

getCredentalContextSet

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

Returns:
set of resolution contexts of the credential

getCredentialType

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.

Returns:
the credential type

XMLTooling-J 1.3.2-redhat-4

Copyright © 2006-2013 Internet2. All Rights Reserved.