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 函数。
返回
完成操作后对此实例的引用。