ClaimsPrincipal.Current 属性
定义
获取当前声明主体。Gets the current claims principal.
public:
static property System::Security::Claims::ClaimsPrincipal ^ Current { System::Security::Claims::ClaimsPrincipal ^ get(); };
public static System.Security.Claims.ClaimsPrincipal Current { get; }
public static System.Security.Claims.ClaimsPrincipal? Current { get; }
member this.Current : System.Security.Claims.ClaimsPrincipal
Public Shared ReadOnly Property Current As ClaimsPrincipal
属性值
当前声明主体。The current claims principal.
注解
默认情况下, Thread.CurrentPrincipal 返回。By default, Thread.CurrentPrincipal is returned. 可以通过设置 ClaimsPrincipalSelector 属性来指定要调用的委托来确定当前主体,从而更改此行为。You can change this behavior by setting the ClaimsPrincipalSelector property to specify a delegate to be called to determine the current principal.