This topic has not yet been rated - Rate this topic

MembershipUserNameSecurityTokenHandler Class

.NET Framework 4.5

A UserNameSecurityTokenHandler that validates a UserNameSecurityToken by using a configured MembershipProvider.

System::Object
  System.IdentityModel.Tokens::SecurityTokenHandler
    System.IdentityModel.Tokens::UserNameSecurityTokenHandler
      System.IdentityModel.Services.Tokens::MembershipUserNameSecurityTokenHandler

Namespace:  System.IdentityModel.Services.Tokens
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)
public ref class MembershipUserNameSecurityTokenHandler : public UserNameSecurityTokenHandler

The MembershipUserNameSecurityTokenHandler type exposes the following members.

  NameDescription
Public methodMembershipUserNameSecurityTokenHandler()Initializes a new instance of the MembershipUserNameSecurityTokenHandler class that uses the default membership provider that is configured for the application.
Public methodMembershipUserNameSecurityTokenHandler(MembershipProvider)Initializes a new instance of the MembershipUserNameSecurityTokenHandler class that uses the specified membership provider.
Top
  NameDescription
Public propertyCanValidateTokenGets a value that indicates whether the current instance can validate security tokens of type UserNameSecurityToken. Always true. (Overrides SecurityTokenHandler::CanValidateToken.)
Public propertyCanWriteTokenGets a value that indicates whether this handler can write tokens of type UserNameSecurityToken. (Inherited from UserNameSecurityTokenHandler.)
Public propertyConfigurationGets or sets the SecurityTokenHandlerConfiguration object that provides configuration for the current instance. (Inherited from SecurityTokenHandler.)
Public propertyContainingCollectionGets the token handler collection that contains the current instance. (Inherited from SecurityTokenHandler.)
Public propertyMembershipProviderGets the MembershipProvider that is configured for the current instance.
Public propertyRetainPasswordGets or sets a value that specifies whether the password will be retained in the bootstrap token that is attached to the ClaimsIdentity that is returned by the ValidateToken method. (Inherited from UserNameSecurityTokenHandler.)
Public propertyTokenTypeGets the Type of the tokens that this handler processes. (Inherited from UserNameSecurityTokenHandler.)
Top
  NameDescription
Public methodCanReadKeyIdentifierClauseReturns a value that indicates whether the XML element referred to by the specified XML reader is a key identifier clause that can be deserialized by this instance. (Inherited from SecurityTokenHandler.)
Public methodCanReadToken(String)Returns a value that indicates whether the specified string can be deserialized as a token of the type processed by this instance. (Inherited from SecurityTokenHandler.)
Public methodCanReadToken(XmlReader)Indicates whether the current XML element can be read as a UserNameSecurityToken. (Inherited from UserNameSecurityTokenHandler.)
Public methodCanWriteKeyIdentifierClauseReturns a value that indicates whether the specified key identifier clause can be serialized by this instance. (Inherited from SecurityTokenHandler.)
Public methodCreateSecurityTokenReferenceWhen overridden in a derived class, creates the security token reference for tokens processed by that class. This method is typically called by a security token service (STS). (Inherited from SecurityTokenHandler.)
Public methodCreateTokenWhen overridden in a derived class, creates a security token using the specified token descriptor. This method is called by a security token service (STS). (Inherited from SecurityTokenHandler.)
Protected methodDetectReplayedTokenWhen overridden in a derived class, throws an exception if the specified token is detected as being replayed. (Inherited from SecurityTokenHandler.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTokenTypeIdentifiersReturns the URIs used in requests to identify a token of the type that can be processed by this handler. (Inherited from UserNameSecurityTokenHandler.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLoadCustomConfigurationLoads custom configuration from XML. (Overrides SecurityTokenHandler::LoadCustomConfiguration(XmlNodeList).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadKeyIdentifierClauseWhen overridden in a derived class, deserializes the XML referenced by the specified XML reader to a key identifier clause that references a token processed by the derived class. (Inherited from SecurityTokenHandler.)
Public methodReadToken(String)When overridden in a derived class, deserializes the specified string to a token of the type processed by the derived class. (Inherited from SecurityTokenHandler.)
Public methodReadToken(XmlReader)Reads a UserNameSecurityToken from the specified reader. (Inherited from UserNameSecurityTokenHandler.)
Public methodReadToken(XmlReader, SecurityTokenResolver)When overridden in a derived class, deserializes the XML referenced by the specified XML reader to a token of the type processed by the derived class by using the specified token resolver. (Inherited from SecurityTokenHandler.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTraceTokenValidationFailureTraces the failure event during the validation of security tokens when tracing is enabled. (Inherited from SecurityTokenHandler.)
Protected methodTraceTokenValidationSuccessTraces the successful validation of security tokens event when tracing is enabled. (Inherited from SecurityTokenHandler.)
Public methodValidateTokenValidates the specified security token by using the configured MembershipProvider. (Overrides SecurityTokenHandler::ValidateToken(SecurityToken).)
Public methodWriteKeyIdentifierClauseWhen overridden in a derived class, serializes the specified key identifier clause to XML. The key identifier clause must be of the type supported by the derived class. (Inherited from SecurityTokenHandler.)
Public methodWriteToken(SecurityToken)When overridden in a derived class, serializes the specified security token to a string. The token must be of the type processed by the derived class. (Inherited from SecurityTokenHandler.)
Public methodWriteToken(XmlWriter, SecurityToken)Serializes the specified UserNameSecurityToken to XML. (Inherited from UserNameSecurityTokenHandler.)
Top

.NET Framework

Supported in: 4.5.1, 4.5

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.