<userNameSecurityTokenHandlerRequirement>

.NET Framework (current version)
 

Provides configuration for the MembershipUserNameSecurityTokenHandler class or derived classes.

<system.identityModel>
<identityConfiguration>
<securityTokenHandlers>
<add>
<userNameSecurityTokenHandlerRequirement>

<system.identityModel>  
  <identityConfiguration>  
    <securityTokenHandlers>  
      <add type="System.IdentityModel.Services.Tokens.MembershipUserNameSecurityTokenHandler, System.IdentityModel.Services">  
        <userNameSecurityTokenHandlerRequirement membershipProviderName=xs:string >  
        </userNameSecurityTokenHandlerRequirement>  
      </add>  
    </securityTokenHandlers>  
  </identityConfiguration>  
</system.identityModel>  

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

Attributes

AttributeDescription
membershipProviderNameSpecifies the MembershipProvider that should be used by the security token handler.

Child Elements

None

Parent Elements

ElementDescription
<add>Adds the specified security token handler to the token handler collection.

The <userNameSecurityTokenHandlerRequirement> element sets the MembershipProvider property when a MembershipUserNameSecurityTokenHandler object is initialized from configuration.

<add type="System.IdentityModel.Services.Tokens.MembershipUserNameSecurityTokenHandler, System.IdentityModel.Services">  
    <userNameSecurityTokenHandlerRequirement membershipProviderName="AspNetSqlProvider/>  
</add>  

Show: