SecurityTokenHandler.TokenType プロパティ

定義

派生クラスでオーバーライドされると、このインスタンスで処理されるセキュリティ トークンの型を取得します。

public:
 abstract property Type ^ TokenType { Type ^ get(); };
public abstract Type TokenType { get; }
member this.TokenType : Type
Public MustOverride ReadOnly Property TokenType As Type

プロパティ値

このインスタンスによって処理されるセキュリティ トークンの型。

次のコードは、 プロパティを TokenType オーバーライドして、カスタム ハンドラーによって処理されるセキュリティ トークンの を返す Type 方法を示しています。 コードはサンプルから取得されます Custom Token 。 このサンプルでは、Simple Web Tokens (SWT) の処理を可能にするカスタム クラスを提供します。 WIF で使用できるこのサンプルとその他のサンプルの詳細と、それらをダウンロードする場所については、「 WIF コード サンプル インデックス」を参照してください。

/// <summary>
/// Gets the System.Type of the SecurityToken is supported by this handler.
/// </summary>
/// <value>The System.Type of the SecurityToken is supported by this handler.</value>
public override Type TokenType
{
    get
    {
        return typeof( SimpleWebToken );
    }
}

注釈

派生クラスでこのプロパティをオーバーライドし、派生クラスによって処理されるセキュリティ トークン (SecurityToken) の を返すType必要があります。

適用対象