MembershipUserNameSecurityTokenHandler 类
定义
UserNameSecurityTokenHandler 使用配置的 UserNameSecurityToken 验证 MembershipProvider。A UserNameSecurityTokenHandler that validates a UserNameSecurityToken by using a configured MembershipProvider.
public ref class MembershipUserNameSecurityTokenHandler : System::IdentityModel::Tokens::UserNameSecurityTokenHandler
public class MembershipUserNameSecurityTokenHandler : System.IdentityModel.Tokens.UserNameSecurityTokenHandler
type MembershipUserNameSecurityTokenHandler = class
inherit UserNameSecurityTokenHandler
Public Class MembershipUserNameSecurityTokenHandler
Inherits UserNameSecurityTokenHandler
- 继承
构造函数
| MembershipUserNameSecurityTokenHandler() |
初始化 MembershipUserNameSecurityTokenHandler 类的一个新实例,该实例为应用程序而配置,使用默认的关系。Initializes a new instance of the MembershipUserNameSecurityTokenHandler class that uses the default membership provider that is configured for the application. |
| MembershipUserNameSecurityTokenHandler(MembershipProvider) |
初始化使用指定成员资格的 MembershipUserNameSecurityTokenHandler 类的新实例。Initializes a new instance of the MembershipUserNameSecurityTokenHandler class that uses the specified membership provider. |
属性
| CanValidateToken |
获取指示当前实例是否能验证类型 UserNameSecurityToken 的安全标记的值。Gets a value that indicates whether the current instance can validate security tokens of type UserNameSecurityToken. 总是为 |
| CanWriteToken |
获取指示此处理程序能否写入 UserNameSecurityToken 类型的标记的值。Gets a value that indicates whether this handler can write tokens of type UserNameSecurityToken. (继承自 UserNameSecurityTokenHandler) |
| Configuration |
获取或设置提供配置当前实例的 SecurityTokenHandlerConfiguration 对象。Gets or sets the SecurityTokenHandlerConfiguration object that provides configuration for the current instance. (继承自 SecurityTokenHandler) |
| ContainingCollection |
获取包含当前实例的标记处理程序集合。Gets the token handler collection that contains the current instance. (继承自 SecurityTokenHandler) |
| MembershipProvider |
获取 MembershipProvider 配置的当前实例。Gets the MembershipProvider that is configured for the current instance. |
| RetainPassword |
获取或设置指定是否在附加到由 ClaimsIdentity 方法返回的 ValidateToken(SecurityToken) 的启动标记中保留密码的值。Gets 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(SecurityToken) method. (继承自 UserNameSecurityTokenHandler) |
| TokenType |
获取此处理程序处理的 Type 的标记。Gets the Type of the tokens that this handler processes. (继承自 UserNameSecurityTokenHandler) |
方法
| CanReadKeyIdentifierClause(XmlReader) |
返回指示由指定 XML 读取器引用的 XML 元素是否为由此实例反序列化的关键标识符子句的值。Returns 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. (继承自 SecurityTokenHandler) |
| CanReadToken(String) |
返回指示指定字符串是否可以作为由此实例处理类型标记的反序列化的值。Returns a value that indicates whether the specified string can be deserialized as a token of the type processed by this instance. (继承自 SecurityTokenHandler) |
| CanReadToken(XmlReader) |
指示当前的 ML 元素是否可读作 UserNameSecurityToken。Indicates whether the current XML element can be read as a UserNameSecurityToken. (继承自 UserNameSecurityTokenHandler) |
| CanWriteKeyIdentifierClause(SecurityKeyIdentifierClause) |
返回指示指定的密钥标识符子句是否可以由此实例序列化的值。Returns a value that indicates whether the specified key identifier clause can be serialized by this instance. (继承自 SecurityTokenHandler) |
| CreateSecurityTokenReference(SecurityToken, Boolean) |
当在派生类中重写,为该类处理的标记创建安全标记引用。When overridden in a derived class, creates the security token reference for tokens processed by that class. 通常通过安全标记服务 (STS) 调用此方法。This method is typically called by a security token service (STS). (继承自 SecurityTokenHandler) |
| CreateToken(SecurityTokenDescriptor) |
在派生类中重写时,使用指定的标记描述符创建新的安全标记。When overridden in a derived class, creates a security token using the specified token descriptor. 通过安全标记服务 (STS) 调用此方法。This method is called by a security token service (STS). (继承自 SecurityTokenHandler) |
| DetectReplayedToken(SecurityToken) |
当在派生类中重写时,如果重播时标记删除,将引发异常。When overridden in a derived class, throws an exception if the specified token is detected as being replayed. (继承自 SecurityTokenHandler) |
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetTokenTypeIdentifiers() |
返回用于请求辨认可由该管理器处理的标记类型的 URIs。Returns the URIs used in requests to identify a token of the type that can be processed by this handler. (继承自 UserNameSecurityTokenHandler) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| LoadCustomConfiguration(XmlNodeList) |
从 XML 加载自定义的配置。Loads custom configuration from XML. |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ReadKeyIdentifierClause(XmlReader) |
当在派生类中重写时,使用指定 XML 读取器将 XML 引用的反序列化为由该类处理的主要标志符子句。When 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. (继承自 SecurityTokenHandler) |
| ReadToken(String) |
当在派生类中重写时,由派生类反序列化类型处理的指定字符串。When overridden in a derived class, deserializes the specified string to a token of the type processed by the derived class. (继承自 SecurityTokenHandler) |
| ReadToken(XmlReader) |
从指定读取器读取 UserNameSecurityToken。Reads a UserNameSecurityToken from the specified reader. (继承自 UserNameSecurityTokenHandler) |
| ReadToken(XmlReader, SecurityTokenResolver) |
当在派生类中重写时,由指定的 XML 读取器使用指定的标记解析器处理派生类类型的标记引用的 XML 进行反序列化。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. (继承自 SecurityTokenHandler) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
| TraceTokenValidationFailure(SecurityToken, String) |
当启用跟踪时,在安全标记的验证过程跟踪失败事件。Traces the failure event during the validation of security tokens when tracing is enabled. (继承自 SecurityTokenHandler) |
| TraceTokenValidationSuccess(SecurityToken) |
当启用跟踪时,跟踪安全标记事件的成功验证。Traces the successful validation of security tokens event when tracing is enabled. (继承自 SecurityTokenHandler) |
| ValidateToken(SecurityToken) |
使用配置的 MembershipProvider 验证指定安全标记。Validates the specified security token by using the configured MembershipProvider. |
| WriteKeyIdentifierClause(XmlWriter, SecurityKeyIdentifierClause) |
在派生类中重写时,将密钥标识符子句序列化到 XML。When 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. (继承自 SecurityTokenHandler) |
| WriteToken(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. (继承自 SecurityTokenHandler) |
| WriteToken(XmlWriter, SecurityToken) |
将指定的 UserNameSecurityToken 序列化为 XML。Serializes the specified UserNameSecurityToken to XML. (继承自 UserNameSecurityTokenHandler) |