Edit

Share via


SamlSerializer.LoadAttribute Method

Definition

Reads an attribute of the subject of a SAML security token using the specified XML reader.

public:
 virtual System::IdentityModel::Tokens::SamlAttribute ^ LoadAttribute(System::Xml::XmlDictionaryReader ^ reader, System::IdentityModel::Selectors::SecurityTokenSerializer ^ keyInfoSerializer, System::IdentityModel::Selectors::SecurityTokenResolver ^ outOfBandTokenResolver);
public virtual System.IdentityModel.Tokens.SamlAttribute LoadAttribute (System.Xml.XmlDictionaryReader reader, System.IdentityModel.Selectors.SecurityTokenSerializer keyInfoSerializer, System.IdentityModel.Selectors.SecurityTokenResolver outOfBandTokenResolver);
abstract member LoadAttribute : System.Xml.XmlDictionaryReader * System.IdentityModel.Selectors.SecurityTokenSerializer * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SamlAttribute
override this.LoadAttribute : System.Xml.XmlDictionaryReader * System.IdentityModel.Selectors.SecurityTokenSerializer * System.IdentityModel.Selectors.SecurityTokenResolver -> System.IdentityModel.Tokens.SamlAttribute
Public Overridable Function LoadAttribute (reader As XmlDictionaryReader, keyInfoSerializer As SecurityTokenSerializer, outOfBandTokenResolver As SecurityTokenResolver) As SamlAttribute

Parameters

reader
XmlDictionaryReader

An XmlDictionaryReader to read the attributes.

keyInfoSerializer
SecurityTokenSerializer

A SecurityTokenSerializer that reads the KeyInfo clause of the digital signature.

outOfBandTokenResolver
SecurityTokenResolver

A SecurityTokenResolver that determines the security token that created the digital signature.

Returns

A SamlAttribute that represents a claim that is an attribute of the subject of a SAML security token.

Remarks

When an application defines its own set of attributes, which is possible because SAML attributes is an extensibility point, a serializer that understands how to read those attributes is needed. A SAML attribute is different than an XML attribute. A SAML attribute is contained within a <saml:Attribute> element and can contain any well-formed XML, not just an attribute. To create a serializer that can read the custom attributes, derive a class from SamlSerializer and override the LoadAttribute(XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver) method.

Applies to

See also