AuthorizationEndpointConventionBuilderExtensions.AllowAnonymous<TBuilder> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
通过将 添加到 AllowAnonymousAttribute 终结点元数据,允许匿名访问终结点。 这将绕过终结点的所有授权检查,包括默认授权策略和回退授权策略。
public:
generic <typename TBuilder>
where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
static TBuilder AllowAnonymous(TBuilder builder);
public static TBuilder AllowAnonymous<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member AllowAnonymous : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function AllowAnonymous(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder
类型参数
- TBuilder
参数
- builder
- TBuilder
终结点约定生成器。
返回
TBuilder
原始约定生成器参数。