org.opensaml.xml.security.credential
Class BasicCredential

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

public class BasicCredential
extends AbstractCredential

A basic implementation of Credential.


Field Summary
 
Fields inherited from class org.opensaml.xml.security.credential.AbstractCredential
credentialContextSet, entityID, keyNames, privateKey, publicKey, secretKey, usageType
 
Constructor Summary
BasicCredential()
          Constructor.
 
Method Summary
 Class<? extends Credential> getCredentialType()
          Get the primary type of the credential instance.
 void setEntityId(String id)
          Sets the ID of the entity this credential is for.
 void setPrivateKey(PrivateKey key)
          Sets the private key 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.
 void setUsageType(UsageType usage)
          Sets the usage type for this credential.
 
Methods inherited from class org.opensaml.xml.security.credential.AbstractCredential
getCredentalContextSet, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCredential

public BasicCredential()
Constructor.

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.

Returns:
the credential type

setEntityId

public void setEntityId(String id)
Sets the ID of the entity this credential is for.

Parameters:
id - ID of the entity this credential is for

setUsageType

public void setUsageType(UsageType usage)
Sets the usage type for this credential.

Parameters:
usage - usage type for this credential

setPublicKey

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

Parameters:
key - public key for this credential

setSecretKey

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

Parameters:
key - secret key for this credential

setPrivateKey

public void setPrivateKey(PrivateKey key)
Sets the private key for this credential.

Parameters:
key - private key for this credential


Copyright © 1999-2013. All Rights Reserved.