ClaimsTransformationAppBuilderExtensions.UseClaimsTransformation 方法

定义

重载

UseClaimsTransformation(IApplicationBuilder)

ClaimsTransformationMiddleware 中间件添加到指定的 IApplicationBuilder ,这将启用声明转换功能。

UseClaimsTransformation(IApplicationBuilder, ClaimsTransformationOptions)

ClaimsTransformationMiddleware 中间件添加到指定的 IApplicationBuilder ,这将启用声明转换功能。

UseClaimsTransformation(IApplicationBuilder, Func<ClaimsTransformationContext,Task<ClaimsPrincipal>>)

ClaimsTransformationMiddleware 中间件添加到指定的 IApplicationBuilder ,这将启用声明转换功能。

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

参数

app
IApplicationBuilder

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

参数

app
IApplicationBuilder

IApplicationBuilder 将中间件添加到其中的。

options
ClaimsTransformationOptions

ClaimsTransformationOptions 中间件配置为的。

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于

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

参数

app
IApplicationBuilder

IApplicationBuilder 将中间件添加到其中的。

transform
Func<ClaimsTransformationContext,Task<ClaimsPrincipal>>

异步转换为另一种的函数 ClaimsPrincipal

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于