Saml2SecurityTokenHandler Members

[Starting with the .NET Framework 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework. The version of WIF addressed by this topic, WIF 3.5, is deprecated and should only be used when developing against the .NET Framework 3.5 SP1 or the .NET Framework 4. For more information about WIF in the .NET Framework 4.5, also known as WIF 4.5, see the Windows Identity Foundation documentation in the .NET Framework 4.5 Development Guide.]

Represents a security token handler that creates security tokens from SAML 2.0 Assertions.

The following tables list the members exposed by the Saml2SecurityTokenHandler type.

Public Constructors

  Name Description
  Saml2SecurityTokenHandler Overloaded. Initializes a new instance of the Saml2SecurityTokenHandler class.

Top

Public Fields

  Name Description
public fieldstatic TokenProfile11ValueType The key identifier value type for SAML 2.0 assertion IDs, as defined by the OASIS Web Services Security SAML Token Profile 1.1. This is a URI.

Top

Public Properties

  Name Description
public property CanValidateToken Overridden. Gets a value that indicates if this handler can validate tokens of type Saml2SecurityToken.
public property CanWriteToken Overridden. Gets a value that indicates whether this handler can deserialize tokens of type Saml2SecurityToken.
public property CertificateValidator Gets or sets the validator that is used by the current instance to validate X.509 certificates.
public property Configuration  Gets or sets the SecurityTokenHandlerConfiguration (Inherited from SecurityTokenHandler)
public property ContainingCollection  Gets or sets the SecurityTokenHandlerCollection that this SecurityTokenHandler is part of. This property should never be set directly. When the SecurityTokenHandler is added to a collection this property is automatically set. (Inherited from SecurityTokenHandler)
public property KeyInfoSerializer Gets or sets the security token serializer that is used to serialize and deserialize key identifiers.
public property SamlSecurityTokenRequirement Gets or sets the security token requirements for this instance.
public property TokenType Overridden. Gets the token type supported by this handler.

Top

Public Methods

(see also Protected Methods)

  Name Description
public method CanReadKeyIdentifierClause Overridden. Indicates if the current XML element is pointing to a KeyIdentifierClause that can be serialized by this instance.
public method CanReadToken Overridden. Indicates whether the current XML element can be read as a token of the type handled by this instance.
public method CanWriteKeyIdentifierClause Overridden. Indicates if the specified key identifier clause can be serialized by this instance.
public method CreateSecurityTokenReference Overridden. Creates the security token reference when the token is not attached to the message.
public method CreateToken Overridden. Creates a security token based on a token descriptor.
public method Equals  (Inherited from Object)
public method GetHashCode  (Inherited from Object)
public method GetTokenTypeIdentifiers Overridden. Gets the token type identifier(s) supported by this handler.
public method GetType  (Inherited from Object)
public method ReadKeyIdentifierClause Overridden. Reads a SecurityKeyIdentifierClause.
public method ReadToken Overridden. Reads a SAML 2.0 token from the specified stream.
public method ReadToken  Overloaded. (Inherited from SecurityTokenHandler)
public method ToString  (Inherited from Object)
public method ValidateToken Overridden. Validates the token data and creates a ClaimsIdentityCollection.
public method WriteKeyIdentifierClause Overridden. Serializes a Saml2AssertionKeyIdentifierClause to the specified XML writer.
public method WriteToken Overridden. Writes a Saml2 Token to the specified XML writer.

Top

Protected Methods

  Name Description
protected method AddDelegateToAttributes Adds all of the delegates associated with the subject into the attribute collection.
protected method CollectAttributeValues Collects attributes with a common claim type, claim value type, and original issuer into a single attribute with multiple values.
protected method CreateAdvice Creates a Saml2Advice object for the assertion.
protected method CreateAttribute Creates a Saml2Attribute object from a claim.
protected method CreateAttributeStatement Creates a Saml2AttributeStatement object from a token descriptor.
protected method CreateAuthenticationStatement Creates a SAML 2.0 authentication statement from the specified authentication information.
protected method CreateClaims Creates claims from a SAML 2.0 token.
protected method CreateConditions Creates the conditions for the assertion.
protected method CreateIssuerNameIdentifier Creates a name identifier that identifies the assertion issuer.
protected method CreateSamlSubject Creates a SAML 2.0 subject for the assertion.
protected method CreateStatements Creates SAML 2.0 statements to be included in the assertion.
protected method CreateXmlStringFromAttributes Builds an XML formatted string from a collection of SAML 2.0 attributes that represent the Actor.
protected method DenormalizeAuthenticationType Returns the AuthenticationContextClasses value matching a normalized value for a SAML authentication context class reference.
protected method DetectReplayedTokens Overridden. Throws an exception if the specified token already exists in the token replay cache; otherwise the token is added to the cache.
protected method Finalize  (Inherited from Object)
protected method FindUpn Finds the UPN claim value in the specified IClaimsIdentity object for the purpose of mapping the identity to a WindowsClaimsIdentity object.
protected method GetCacheExpirationTime Returns the time until which the token should be held in the token replay cache.
protected method GetEncryptingCredentials Gets the token encrypting credentials. Override this method to change the token encrypting credentials.
protected method GetSigningCredentials Gets the credentials for signing the assertion.
protected method MemberwiseClone  (Inherited from Object)
protected method NormalizeAuthenticationContextClassReference Returns the normalized value matching a SAML authentication context class reference.
protected method ProcessAttributeStatement Creates claims from a SAML 2.0 attribute statement and adds them to the specified subject.
protected method ProcessAuthenticationStatement Creates claims from a SAML 2.0 authentication statement and adds them to the specified subject.
protected method ProcessAuthorizationDecisionStatement Creates claims from a SAML 2.0 authorization decision statement and adds them to the specified subject.
protected method ProcessSamlSubject Creates claims from the SAML 2.0 subject and adds them to the specified subject.
protected method ProcessStatement Creates claims from a collection of SAML 2.0 statements and adds them to the specified subject.
protected method ReadAction Reads the <saml:Action> element.
protected method ReadAdvice Reads the <saml:Advice> element.
protected method ReadAssertion Reads the <saml:Assertion> element.
protected method ReadAttribute Reads the <saml:Attribute> element.
protected method ReadAttributeStatement Reads the <saml:AttributeStatement> element, or a <saml:Statement> element that specifies an xsi:type of saml:AttributeStatementType.
protected method ReadAttributeValue Reads an attribute value.
protected method ReadAudienceRestriction Reads the <saml:AudienceRestriction> element or a <saml:Condition> element that specifies an xsi:type of saml:AudienceRestrictionType.
protected method ReadAuthenticationContext Reads the <saml:AuthnContext> element.
protected method ReadAuthenticationStatement Reads the <saml:AuthnStatement> element or a <saml:Statement> element that specifies an xsi:type of saml:AuthnStatementType.
protected method ReadAuthorizationDecisionStatement Reads the <saml:AuthzDecisionStatement> element or a <saml:Statement> element that specifies an xsi:type of saml:AuthzDecisionStatementType.
protected method ReadConditions Reads the <saml:Conditions> element.
protected method ReadEncryptedId Reads the <saml:EncryptedId> element.
protected method ReadEvidence Reads the <saml:Evidence> element.
protected method ReadIssuer Reads the <saml:Issuer> element.
protected method ReadNameID Reads the <saml:NameID> element.
protected method ReadNameIDType Both <Issuer> and <NameID> are of NameIDType. This method reads the content of either one of those elements.
protected method ReadProxyRestriction Reads the <saml:ProxyRestriction> element, or a <saml:Condition> element that specifies an xsi:type of saml:ProxyRestrictionType.
protected method ReadSigningKeyInfo Deserializes the SAML Signing KeyInfo.
protected method ReadStatement Reads the <saml:Statement> element.
protected method ReadSubject Reads the <saml:Subject> element.
protected method ReadSubjectConfirmation Reads the <SubjectConfirmation> element.
protected method ReadSubjectConfirmationData Reads the <saml:SubjectConfirmationData> element.
protected method ReadSubjectID This method handles the construct used in the <Subject> and <SubjectConfirmation> elements for ID.
protected method ReadSubjectKeyInfo Deserializes the SAML Subject <ds:KeyInfo> element.
protected method ReadSubjectLocality Reads the <saml:SubjectLocality> element.
protected method ResolveIssuerToken Resolves the Signing Key Identifier to a SecurityToken.
protected method ResolveSecurityKeys Resolves the collection of SecurityKey referenced in a Saml2Assertion.
protected method SetDelegateFromAttribute This method gets called when a special type of Saml2Attribute is detected. The Saml2Attribute passed in wraps a Saml2Attribute that contains a collection of attribute values (in the Values property), each of which will get mapped to a claim. All of the claims will be returned in an IClaimsIdentity with the specified issuer.
protected method TryResolveIssuerToken Resolves the Signing Key Identifier to a SecurityToken.
protected method ValidateConditions Validates the specified Saml2Conditions object.
protected method ValidateConfirmationData Validates the specified Saml2SubjectConfirmationData object.
protected method WriteAction Writes the <saml:Action> element.
protected method WriteAdvice Writes the <saml:Advice> element.
protected method WriteAssertion Serializes the specified SAML assertion to the specified XML writer.
protected method WriteAttribute Writes the <saml:Attribute> element.
protected method WriteAttributeStatement Writes the <saml:AttributeStatement> element.
protected method WriteAttributeValue Writes the saml:Attribute value.
protected method WriteAudienceRestriction Writes the <saml:AudienceRestriction> element.
protected method WriteAuthenticationContext Writes the <saml:AuthnContext> element.
protected method WriteAuthenticationStatement Writes the <saml:AuthnStatement> element.
protected method WriteAuthorizationDecisionStatement Writes the <saml:AuthzDecisionStatement> element.
protected method WriteConditions Writes the <saml:Conditions> element.
protected method WriteEvidence Writes the <saml:Evidence> element.
protected method WriteIssuer Writes the <saml:Issuer> element.
protected method WriteNameID Writes the <saml:NameID> element.
protected method WriteNameIDType Both <Issuer> and <NameID> are of NameIDType. This method writes the content of either one of those elements.
protected method WriteProxyRestriction Writes the <saml:ProxyRestriction> element.
protected method WriteSigningKeyInfo Writes the Signing <ds:KeyInfo> element using the specified XML writer.
protected method WriteStatement Writes a Saml2Statement.
protected method WriteSubject Writes the <saml:Subject> element.
protected method WriteSubjectConfirmation Writes the <saml:SubjectConfirmation> element.
protected method WriteSubjectConfirmationData Writes the <saml:SubjectConfirmationData> element.
protected method WriteSubjectKeyInfo Serializes the Subject <ds:KeyInfo> element using the specified XML writer.
protected method WriteSubjectLocality Writes the <saml:SubjectLocality> element.

Top

See Also

Reference

Saml2SecurityTokenHandler Class
Microsoft.IdentityModel.Tokens.Saml2 Namespace
Saml2SecurityToken Class

Other Resources

Token Handlers
What is Windows Identity Foundation?

Copyright © 2008 by Microsoft Corporation. All rights reserved.