UserNameSecurityTokenProvider 类

定义

表示为 SOAP 消息发送方提供 UserNameSecurityToken 安全令牌的安全令牌提供程序。Represents a security token provider that provides UserNameSecurityToken security tokens for a SOAP message sender.

public ref class UserNameSecurityTokenProvider : System::IdentityModel::Selectors::SecurityTokenProvider
public class UserNameSecurityTokenProvider : System.IdentityModel.Selectors.SecurityTokenProvider
type UserNameSecurityTokenProvider = class
    inherit SecurityTokenProvider
Public Class UserNameSecurityTokenProvider
Inherits SecurityTokenProvider
继承
UserNameSecurityTokenProvider

注解

多数情况下无需直接调用 UserNameSecurityTokenProvider 类,因为它在客户端发送需要 UserNameSecurityToken 安全令牌的 SOAP 消息时调用。In most instances the UserNameSecurityTokenProvider class doesn't need to be called directly, as it is called when a client sends a SOAP message that requires a UserNameSecurityToken security token. 具体来说,客户端使用 ClientCredentials 类指定所需的安全令牌的类型,然后 ClientCredentials 类调用 GetToken 方法来获取安全令牌。Specifically, a client specifies the type of security token needed using the ClientCredentials class and the ClientCredentials class calls the GetToken method to get a security token. 如果所需的安全令牌为 UserNameSecurityToken 安全令牌,则 GetToken 方法调用 GetTokenCore 方法。When the security token needed is a UserNameSecurityToken security token, the GetToken method calls the GetTokenCore method.

构造函数

UserNameSecurityTokenProvider(String, String)

使用指定的用户名和密码初始化 UserNameSecurityTokenProvider 类的新实例。Initializes a new instance of the UserNameSecurityTokenProvider class using the specified username and password.

属性

SupportsTokenCancellation

获取一个值,该值指示是否可以取消安全令牌。Gets a value that indicates whether the security token can be cancelled.

(继承自 SecurityTokenProvider)
SupportsTokenRenewal

获取一个值,该值指示是否可以续订安全令牌。Gets a value that indicates whether the security token is renewable.

(继承自 SecurityTokenProvider)

方法

BeginCancelToken(TimeSpan, SecurityToken, AsyncCallback, Object)

开始异步操作以取消安全令牌。Begins an asynchronous operation to cancel a security token.

(继承自 SecurityTokenProvider)
BeginCancelTokenCore(TimeSpan, SecurityToken, AsyncCallback, Object)

开始异步操作以取消安全令牌。Begins an asynchronous operation to cancel a security token.

(继承自 SecurityTokenProvider)
BeginGetToken(TimeSpan, AsyncCallback, Object)

开始异步操作以获取安全令牌。Begins an asynchronous operation to get a security token.

(继承自 SecurityTokenProvider)
BeginGetTokenCore(TimeSpan, AsyncCallback, Object)

开始异步操作以获取安全令牌。Begins an asynchronous operation to get a security token.

(继承自 SecurityTokenProvider)
BeginRenewToken(TimeSpan, SecurityToken, AsyncCallback, Object)

开始异步操作以续订安全令牌。Begins an asynchronous operation that renews a security token.

(继承自 SecurityTokenProvider)
BeginRenewTokenCore(TimeSpan, SecurityToken, AsyncCallback, Object)

开始异步操作以续订安全令牌。Begins an asynchronous operation that renews a security token.

(继承自 SecurityTokenProvider)
CancelToken(TimeSpan, SecurityToken)

取消安全令牌。Cancels a security token.

(继承自 SecurityTokenProvider)
CancelTokenAsync(TimeSpan, SecurityToken)

取消安全令牌。Cancels a security token.

(继承自 SecurityTokenProvider)
CancelTokenCore(TimeSpan, SecurityToken)

取消安全令牌。Cancels a security token.

(继承自 SecurityTokenProvider)
CancelTokenCoreAsync(TimeSpan, SecurityToken)

取消安全令牌。Cancels a security token.

(继承自 SecurityTokenProvider)
EndCancelToken(IAsyncResult)

完成异步操作以取消安全令牌。Completes an asynchronous operation to cancel a security token.

(继承自 SecurityTokenProvider)
EndCancelTokenCore(IAsyncResult)

完成异步操作以取消安全令牌。Completes an asynchronous operation to cancel a security token.

(继承自 SecurityTokenProvider)
EndGetToken(IAsyncResult)

完成异步操作以获取安全令牌。Completes an asynchronous operation to get a security token.

(继承自 SecurityTokenProvider)
EndGetTokenCore(IAsyncResult)

完成异步操作以获取安全令牌。Completes an asynchronous operation to get a security token.

(继承自 SecurityTokenProvider)
EndRenewToken(IAsyncResult)

完成异步操作以续订安全令牌。Completes an asynchronous operation to renew a security token.

(继承自 SecurityTokenProvider)
EndRenewTokenCore(IAsyncResult)

完成异步操作以续订安全令牌。Completes an asynchronous operation to renew the security token.

(继承自 SecurityTokenProvider)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetToken(TimeSpan)

获取安全令牌。Gets a security token.

(继承自 SecurityTokenProvider)
GetTokenAsync(TimeSpan)

获取安全令牌。Gets a security token.

(继承自 SecurityTokenProvider)
GetTokenCore(TimeSpan)

根据构造函数中指定的用户名和密码获取安全令牌。Gets a security token based on the username and password specified in the constructor.

GetTokenCoreAsync(TimeSpan)

获取安全令牌。Gets a security token.

(继承自 SecurityTokenProvider)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
RenewToken(TimeSpan, SecurityToken)

续订安全令牌。Renews a security token.

(继承自 SecurityTokenProvider)
RenewTokenAsync(TimeSpan, SecurityToken)

续订安全令牌。Renews a security token.

(继承自 SecurityTokenProvider)
RenewTokenCore(TimeSpan, SecurityToken)

续订安全令牌。Renews a security token.

(继承自 SecurityTokenProvider)
RenewTokenCoreAsync(TimeSpan, SecurityToken)

续订安全令牌。Renews a security token.

(继承自 SecurityTokenProvider)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅