ClientCredentialsSecurityTokenManager 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
管理用戶端的安全性權杖。
public ref class ClientCredentialsSecurityTokenManager : System::IdentityModel::Selectors::SecurityTokenManager
public class ClientCredentialsSecurityTokenManager : System.IdentityModel.Selectors.SecurityTokenManager
type ClientCredentialsSecurityTokenManager = class
inherit SecurityTokenManager
Public Class ClientCredentialsSecurityTokenManager
Inherits SecurityTokenManager
- 繼承
- 衍生
範例
下列程式碼示範如何覆寫這個類別,以建立自訂用戶端認證安全性權杖管理員。
internal class MyClientCredentialsSecurityTokenManager :
ClientCredentialsSecurityTokenManager
{
MyClientCredentials credentials;
public MyClientCredentialsSecurityTokenManager(MyClientCredentials credentials)
: base(credentials)
{
this.credentials = credentials;
}
public override SecurityTokenProvider CreateSecurityTokenProvider(
SecurityTokenRequirement tokenRequirement)
{
// Return your implementation of the SecurityTokenProvider, if required.
// This implementation delegates to the base class.
return base.CreateSecurityTokenProvider(tokenRequirement);
}
public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator(
SecurityTokenRequirement tokenRequirement, out SecurityTokenResolver outOfBandTokenResolver)
{
// Return your implementation of the SecurityTokenAuthenticator, if required.
// This implementation delegates to the base class.
return base.CreateSecurityTokenAuthenticator(tokenRequirement, out outOfBandTokenResolver);
}
public override SecurityTokenSerializer CreateSecurityTokenSerializer(SecurityTokenVersion version)
{
// Return your implementation of the SecurityTokenSerializer, if required.
// This implementation delegates to the base class.
return base.CreateSecurityTokenSerializer(version);
}
}
Friend Class MyClientCredentialsSecurityTokenManager
Inherits ClientCredentialsSecurityTokenManager
Private credentials As MyClientCredentials
Public Sub New(ByVal credentials As MyClientCredentials)
MyBase.New(credentials)
Me.credentials = credentials
End Sub
Public Overrides Function CreateSecurityTokenProvider( _
ByVal tokenRequirement As SecurityTokenRequirement) As SecurityTokenProvider
' Return your implementation of the SecurityTokenProvider, if required.
' This implementation delegates to the base class.
Return MyBase.CreateSecurityTokenProvider(tokenRequirement)
End Function
Public Overrides Function CreateSecurityTokenAuthenticator( _
ByVal tokenRequirement As SecurityTokenRequirement, _
ByRef outOfBandTokenResolver As SecurityTokenResolver) As SecurityTokenAuthenticator
' Return your implementation of the SecurityTokenAuthenticator, if required.
' This implementation delegates to the base class.
Return MyBase.CreateSecurityTokenAuthenticator(tokenRequirement, outOfBandTokenResolver)
End Function
Public Overrides Function CreateSecurityTokenSerializer(ByVal version As SecurityTokenVersion) _
As SecurityTokenSerializer
' Return your implementation of the SecurityTokenSerializer, if required.
' This implementation delegates to the base class.
Return MyBase.CreateSecurityTokenSerializer(version)
End Function
End Class
備註
這個類別會處理用戶端的安全性權杖序列化、安全性權杖提供和安全性權杖驗證。 每個用戶端通道處理站都有一個此類別的執行個體。
建構函式
ClientCredentialsSecurityTokenManager(ClientCredentials) |
初始化 ClientCredentialsSecurityTokenManager 類別的新執行個體。 |
屬性
ClientCredentials |
取得用戶端認證。 |
方法
CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver) |
建立安全性權杖驗證器。 |
CreateSecurityTokenProvider(SecurityTokenRequirement) |
建立安全性權杖提供者。 |
CreateSecurityTokenSerializer(SecurityTokenVersion) |
建立安全性權杖序列化程式。 |
CreateSecurityTokenSerializer(SecurityVersion) |
建立安全性權杖序列化程式。 |
Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
GetHashCode() |
做為預設雜湊函式。 (繼承來源 Object) |
GetType() |
取得目前執行個體的 Type。 (繼承來源 Object) |
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement) |
取得值,這個值表示指定的權杖需求是否為已發出的安全性權杖需求。 |
MemberwiseClone() |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
ToString() |
傳回代表目前物件的字串。 (繼承來源 Object) |