Export (0) Print
Expand All

<nameClaimType>

.NET Framework 4.5

Sets the claim type that specifies the Name property. The claim type is used to search for a Claim in the collection of ClaimsIdentity objects returned by the ValidateToken method of this token handler. The value of the matching claim is then set as the name of the IIdentity generated from this token handler.

<system.identityModel>
  <identityConfiguration>
    <securityTokenHandlers>
      <add> [securityTokenHandlers]
        <samlSecurityTokenRequirement>
          <nameClaimType>
<system.identityModel>
  <identityConfiguration>
    <securityTokenHandlers>
      <add>
        <samlSecurityTokenRequirement>
          <nameClaimType value=xs:string>
          </nameClaimType>
        </samlSecurityTokenRequirement>
      </add>
    </securityTokenHandlers>
  </identityConfiguration>
</system.identityModel>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

value

A string that specifies the URI that represents the claim type of the claim to use for the Name property. Required.

Child Elements

None

Parent Elements

Element

Description

<samlSecurityTokenRequirement>

Provides configuration for the SamlSecurityTokenHandler class, the Saml2SecurityTokenHandler class, or a derived class of either of these classes.

The <nameClaimType> element sets the NameClaimType property when a SamlSecurityTokenRequirement object is initialized from configuration.

    <add type="System.IdentityModel.Tokens.SamlSecurityTokenHandler, System.IdentityModel">
        <samlSecurityTokenRequirement>
            <nameClaimType value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" />
        </samlSecurityTokenRequirement>
    </add>
Show:
© 2015 Microsoft