ClaimsTransformationAppBuilderExtensions.UseClaimsTransformation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseClaimsTransformation(IApplicationBuilder)
將 ClaimsTransformationMiddleware 中介軟體新增至指定的 IApplicationBuilder ,以啟用宣告轉換功能。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseClaimsTransformation(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClaimsTransformation (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseClaimsTransformation : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseClaimsTransformation (app As IApplicationBuilder) As IApplicationBuilder
參數
IApplicationBuilder要加入中介軟體的 。
傳回
完成作業之後,這個執行個體的參考。
適用於
UseClaimsTransformation(IApplicationBuilder, ClaimsTransformationOptions)
將 ClaimsTransformationMiddleware 中介軟體新增至指定的 IApplicationBuilder ,以啟用宣告轉換功能。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseClaimsTransformation(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::ClaimsTransformationOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClaimsTransformation (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.ClaimsTransformationOptions options);
static member UseClaimsTransformation : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.ClaimsTransformationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseClaimsTransformation (app As IApplicationBuilder, options As ClaimsTransformationOptions) As IApplicationBuilder
參數
IApplicationBuilder要加入中介軟體的 。
- options
- ClaimsTransformationOptions
要 ClaimsTransformationOptions 設定中介軟體的 。
傳回
完成作業之後,這個執行個體的參考。
適用於
UseClaimsTransformation(IApplicationBuilder, Func<ClaimsTransformationContext,Task<ClaimsPrincipal>>)
將 ClaimsTransformationMiddleware 中介軟體新增至指定的 IApplicationBuilder ,以啟用宣告轉換功能。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseClaimsTransformation(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Func<Microsoft::AspNetCore::Authentication::ClaimsTransformationContext ^, System::Threading::Tasks::Task<System::Security::Claims::ClaimsPrincipal ^> ^> ^ transform);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClaimsTransformation (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Authentication.ClaimsTransformationContext,System.Threading.Tasks.Task<System.Security.Claims.ClaimsPrincipal>> transform);
static member UseClaimsTransformation : Microsoft.AspNetCore.Builder.IApplicationBuilder * Func<Microsoft.AspNetCore.Authentication.ClaimsTransformationContext, System.Threading.Tasks.Task<System.Security.Claims.ClaimsPrincipal>> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseClaimsTransformation (app As IApplicationBuilder, transform As Func(Of ClaimsTransformationContext, Task(Of ClaimsPrincipal))) As IApplicationBuilder
參數
IApplicationBuilder要加入中介軟體的 。
- transform
- Func<ClaimsTransformationContext,Task<ClaimsPrincipal>>
以非同步方式將一個轉換成另一個 ClaimsPrincipal 的函式。
傳回
完成作業之後,這個執行個體的參考。