|
shibboleth-3.5.0
|
A resolved attribute. More...
#include <shibsp/attribute/Attribute.h>
Public Types | |
| typedef Attribute * | AttributeFactory(DDF &in) |
| A function that unmarshalls remoted data into the proper Attribute subclass. | |
Public Member Functions | |
| const char * | getId () const |
| Returns the Attribute identifier. | |
| const std::vector< std::string > & | getAliases () const |
| Returns all of the effective names for the Attribute. | |
| std::vector< std::string > & | getAliases () |
| Returns all of the effective names for the Attribute. | |
| void | setCaseSensitive (bool caseSensitive) |
| Sets whether case sensitivity should apply to basic value comparisons. | |
| void | setInternal (bool internal) |
| Sets whether the attribute should be exported for CGI use. | |
| bool | isCaseSensitive () const |
| Indicates whether case sensitivity should apply to basic value comparisons. | |
| bool | isInternal () const |
| Indicates whether the attribute should be exported for CGI use. | |
| virtual size_t | valueCount () const |
| Returns the number of values. | |
| virtual const std::vector< std::string > & | getSerializedValues () const |
| Returns serialized Attribute values encoded as UTF-8 strings. | |
| virtual void | clearSerializedValues ()=0 |
| Informs the Attribute that values have changed and any serializations must be cleared. | |
| virtual const char * | getString (size_t index) const |
| Gets the string equivalent of the value at the specified position (starting from zero). | |
| virtual const char * | getScope (size_t index) const |
| Gets the "scope" of the value at the specified position (starting from zero). | |
| virtual void | removeValue (size_t index) |
| Removes the value at the specified position (starting from zero). | |
| virtual DDF | marshall () const |
| Marshalls an Attribute for remoting. | |
Static Public Member Functions | |
| static Attribute * | unmarshall (DDF &in) |
| Unmarshalls a remoted Attribute. | |
| static void | registerFactory (const char *type, AttributeFactory *factory) |
| Registers an AttributeFactory function for a given attribute "type". | |
| static void | deregisterFactory (const char *type) |
| Deregisters an AttributeFactory function for a given attribute "type". | |
| static void | deregisterFactories () |
| Clears the map of factories. | |
Protected Member Functions | |
| Attribute (const std::vector< std::string > &ids) | |
| Constructor. | |
| Attribute (DDF &in) | |
| Constructs based on a remoted Attribute. | |
Protected Attributes | |
| std::vector< std::string > | m_serialized |
| Maintains a copy of serialized attribute values, when possible. | |
A resolved attribute.
Resolved attributes are a neutral construct that represent both simple and complex attribute data structures that might be found in SAML assertions or obtained from other sources.
Attributes consist of an id/name that is locally unique (that is, unique to a configuration at any given point in time) and zero or more values. Values can be of any type or structure, but will generally be made available to applications only if a serialized string form exists. More complex values can be used with access control plugins and other components that understand them, however.
|
protected |
Constructor.
| ids | array with primary identifier in first position, followed by any aliases |
|
protected |
|
pure virtual |
Informs the Attribute that values have changed and any serializations must be cleared.
Implemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, shibsp::SimpleAttribute, and shibsp::XMLAttribute.
|
static |
Deregisters an AttributeFactory function for a given attribute "type".
| type | string used at the root of remoted Attribute structures |
| std::vector< std::string > & shibsp::Attribute::getAliases | ( | ) |
Returns all of the effective names for the Attribute.
| const std::vector< std::string > & shibsp::Attribute::getAliases | ( | ) | const |
Returns all of the effective names for the Attribute.
| const char * shibsp::Attribute::getId | ( | ) | const |
|
virtual |
Gets the "scope" of the value at the specified position (starting from zero).
| index | position of value |
Reimplemented in shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, and shibsp::ScopedAttribute.
|
virtual |
Returns serialized Attribute values encoded as UTF-8 strings.
Reimplemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, and shibsp::XMLAttribute.
|
virtual |
Gets the string equivalent of the value at the specified position (starting from zero).
| index | position of value |
Reimplemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, and shibsp::XMLAttribute.
| bool shibsp::Attribute::isCaseSensitive | ( | ) | const |
Indicates whether case sensitivity should apply to basic value comparisons.
| bool shibsp::Attribute::isInternal | ( | ) | const |
Indicates whether the attribute should be exported for CGI use.
|
virtual |
Marshalls an Attribute for remoting.
This allows Attribute objects to be communicated across process boundaries without excess XML parsing. The DDF returned must be a struct containing a single list member named with the Attribute's "id". The name of the struct should contain the registered name of the Attribute implementation.
Reimplemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, shibsp::SimpleAttribute, and shibsp::XMLAttribute.
|
static |
Registers an AttributeFactory function for a given attribute "type".
| type | string used at the root of remoted Attribute structures |
| factory | factory function |
|
virtual |
Removes the value at the specified position (starting from zero).
| index | position of value to remove |
Reimplemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, and shibsp::XMLAttribute.
| void shibsp::Attribute::setCaseSensitive | ( | bool | caseSensitive | ) |
Sets whether case sensitivity should apply to basic value comparisons.
| caseSensitive | true iff value comparisons should be case sensitive |
| void shibsp::Attribute::setInternal | ( | bool | internal | ) |
Sets whether the attribute should be exported for CGI use.
| internal | true iff the attribute should NOT be exported |
|
virtual |
Returns the number of values.
Reimplemented in shibsp::BinaryAttribute, shibsp::ExtensibleAttribute, shibsp::NameIDAttribute, shibsp::ScopedAttribute, and shibsp::XMLAttribute.
|
mutableprotected |
Maintains a copy of serialized attribute values, when possible.
Implementations should maintain the array when values are added or removed.