共用方式為


HttpRequestMessageExtensionMethods.GetUserPrincipal 方法

定義

取得與指定之 HTTP 要求訊息相關聯的使用者主體。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::Principal::IPrincipal ^ GetUserPrincipal(System::Net::Http::HttpRequestMessage ^ httpRequestMessage);
public static System.Security.Principal.IPrincipal GetUserPrincipal (this System.Net.Http.HttpRequestMessage httpRequestMessage);
static member GetUserPrincipal : System.Net.Http.HttpRequestMessage -> System.Security.Principal.IPrincipal
<Extension()>
Public Function GetUserPrincipal (httpRequestMessage As HttpRequestMessage) As IPrincipal

參數

httpRequestMessage
HttpRequestMessage

要從其中取得使用者主體的 HTTP 要求訊息。

傳回

與指定之 HTTP 要求訊息相關聯的使用者主體。

適用於