SamlSerializer.LoadAttribute Method (XmlDictionaryReader, SecurityTokenSerializer, SecurityTokenResolver)

 

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

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public virtual SamlAttribute LoadAttribute(
	XmlDictionaryReader reader,
	SecurityTokenSerializer keyInfoSerializer,
	SecurityTokenResolver outOfBandTokenResolver
)

Parameters

reader
Type: System.Xml.XmlDictionaryReader

An XmlDictionaryReader to read the attributes.

keyInfoSerializer
Type: System.IdentityModel.Selectors.SecurityTokenSerializer

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

outOfBandTokenResolver
Type: System.IdentityModel.Selectors.SecurityTokenResolver

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

Return Value

Type: System.IdentityModel.Tokens.SamlAttribute

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

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.

.NET Framework
Available since 3.0
Return to top
Show: