IPrincipal インターフェイス

定義

プリンシパル オブジェクトの基本機能を定義します。

public interface class IPrincipal
public interface IPrincipal
[System.Runtime.InteropServices.ComVisible(true)]
public interface IPrincipal
type IPrincipal = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type IPrincipal = interface
Public Interface IPrincipal
派生
属性

注釈

プリンシパル オブジェクトは、そのユーザーの ID (IIdentity) とそのユーザーが属するロールなど、コードが実行されているユーザーのセキュリティ コンテキストを表します。

IPrincipal インターフェイスを実装するには、すべてのプリンシパル オブジェクトが必要です。 IPrincipal実装の詳細については、ClaimsPrincipal クラスを参照してください。

プロパティ

名前 説明
Identity

現在のプリンシパルの ID を取得します。

メソッド

名前 説明
IsInRole(String)

現在のプリンシパルが指定したロールに属しているかどうかを判断します。

適用対象