HttpRequestMessageExtensionMethods.GetUserPrincipal(HttpRequestMessage) 方法

定義

取得與指定之 HTTP 要求訊息相關聯的使用者主體。Gets the user principal associated with the specified HTTP request message.

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

參數

httpRequestMessage
HttpRequestMessage

要從其中取得使用者主體的 HTTP 要求訊息。The HTTP request message from which to get the user principal.

傳回

與指定之 HTTP 要求訊息相關聯的使用者主體。The user principal associated with the specified HTTP request message.

適用於