xmltooling::CredentialCriteria Class Reference

Class for specifying criteria by which a CredentialResolver should resolve credentials. More...

#include <xmltooling/security/CredentialCriteria.h>

List of all members.

Public Types

 KEYINFO_EXTRACTION_KEY = 1
 KEYINFO_EXTRACTION_KEYNAMES = 2
enum  keyinfo_extraction_t { KEYINFO_EXTRACTION_KEY = 1, KEYINFO_EXTRACTION_KEYNAMES = 2 }
 Bitmask constants controlling the kinds of criteria set automatically based on a KeyInfo object.

Public Member Functions

virtual bool matches (const Credential &credential) const
 Determines whether the supplied Credential matches this CredentialCriteria.
unsigned int getUsage () const
 Get key usage criteria.
void setUsage (unsigned int usage)
 Set key usage criteria.
const char * getPeerName () const
 Get the peer name criteria.
void setPeerName (const char *peerName)
 Set the peer name criteria.
const char * getKeyAlgorithm () const
 Get the key algorithm criteria.
void setKeyAlgorithm (const char *keyAlgorithm)
 Set the key algorithm criteria.
unsigned int getKeySize () const
 Get the key size criteria.
void setKeySize (unsigned int keySize)
 Set the key size criteria.
void setXMLAlgorithm (const XMLCh *algorithm)
 Set the key algorithm and size criteria based on an XML algorithm specifier.
const std::set< std::string > & getKeyNames () const
 Gets key name criteria.
std::set< std::string > & getKeyNames ()
 Gets key name criteria.
virtual XSECCryptoKey * getPublicKey () const
 Returns the public key criteria.
void setPublicKey (XSECCryptoKey *key)
 Sets the public key criteria.
const xmlsignature::KeyInfogetKeyInfo () const
 Gets the KeyInfo criteria.
virtual void setKeyInfo (const xmlsignature::KeyInfo *keyInfo, int extraction=0)
 Sets the KeyInfo criteria.
DSIGKeyInfoList * getNativeKeyInfo () const
 Gets the native KeyInfo criteria.
virtual void setNativeKeyInfo (DSIGKeyInfoList *keyInfo, int extraction=0)
 Sets the KeyInfo criteria.
void setSignature (const xmlsignature::Signature &sig, int extraction=0)
 Sets the KeyInfo criteria from an XML Signature.


Detailed Description

Class for specifying criteria by which a CredentialResolver should resolve credentials.


Member Function Documentation

const char* xmltooling::CredentialCriteria::getKeyAlgorithm (  )  const [inline]

Get the key algorithm criteria.

Returns:
the key algorithm

const xmlsignature::KeyInfo* xmltooling::CredentialCriteria::getKeyInfo (  )  const [inline]

Gets the KeyInfo criteria.

Returns:
the KeyInfo criteria

std::set<std::string>& xmltooling::CredentialCriteria::getKeyNames (  )  [inline]

Gets key name criteria.

Returns:
a mutable set of key names

const std::set<std::string>& xmltooling::CredentialCriteria::getKeyNames (  )  const [inline]

Gets key name criteria.

Returns:
an immutable set of key names

unsigned int xmltooling::CredentialCriteria::getKeySize (  )  const [inline]

Get the key size criteria.

Returns:
the key size, or 0

DSIGKeyInfoList* xmltooling::CredentialCriteria::getNativeKeyInfo (  )  const [inline]

Gets the native KeyInfo criteria.

Returns:
the native KeyInfo criteria

const char* xmltooling::CredentialCriteria::getPeerName (  )  const [inline]

Get the peer name criteria.

Returns:
the peer name

virtual XSECCryptoKey* xmltooling::CredentialCriteria::getPublicKey (  )  const [inline, virtual]

Returns the public key criteria.

Returns:
a public key

unsigned int xmltooling::CredentialCriteria::getUsage (  )  const [inline]

Get key usage criteria.

Returns:
the usage mask

virtual bool xmltooling::CredentialCriteria::matches ( const Credential credential  )  const [virtual]

Determines whether the supplied Credential matches this CredentialCriteria.

Parameters:
credential the Credential to evaluate
Returns:
true iff the Credential is consistent with this criteria

void xmltooling::CredentialCriteria::setKeyAlgorithm ( const char *  keyAlgorithm  )  [inline]

Set the key algorithm criteria.

Parameters:
keyAlgorithm The key algorithm to set

virtual void xmltooling::CredentialCriteria::setKeyInfo ( const xmlsignature::KeyInfo keyInfo,
int  extraction = 0 
) [virtual]

Sets the KeyInfo criteria.

Parameters:
keyInfo the KeyInfo criteria
extraction bitmask of criteria to auto-extract from KeyInfo

void xmltooling::CredentialCriteria::setKeySize ( unsigned int  keySize  )  [inline]

Set the key size criteria.

Parameters:
keySize Key size to set

virtual void xmltooling::CredentialCriteria::setNativeKeyInfo ( DSIGKeyInfoList *  keyInfo,
int  extraction = 0 
) [virtual]

Sets the KeyInfo criteria.

Parameters:
keyInfo the KeyInfo criteria
extraction bitmask of criteria to auto-extract from KeyInfo

void xmltooling::CredentialCriteria::setPeerName ( const char *  peerName  )  [inline]

Set the peer name criteria.

Parameters:
peerName peer name to set

void xmltooling::CredentialCriteria::setPublicKey ( XSECCryptoKey *  key  )  [inline]

Sets the public key criteria.

The lifetime of the key MUST extend for the lifetime of this object.

Parameters:
key a public key

void xmltooling::CredentialCriteria::setSignature ( const xmlsignature::Signature sig,
int  extraction = 0 
)

Sets the KeyInfo criteria from an XML Signature.

Parameters:
sig the Signature containing KeyInfo criteria
extraction bitmask of criteria to auto-extract from KeyInfo

void xmltooling::CredentialCriteria::setUsage ( unsigned int  usage  )  [inline]

Set key usage criteria.

Parameters:
usage the usage mask to set

void xmltooling::CredentialCriteria::setXMLAlgorithm ( const XMLCh *  algorithm  )  [inline]

Set the key algorithm and size criteria based on an XML algorithm specifier.

Parameters:
algorithm XML algorithm specifier


The documentation for this class was generated from the following file:
Generated on Mon Oct 19 14:18:34 2009 for xmltooling by  doxygen 1.4.7