共用方式為


AuthorizationEndpointConventionBuilderExtensions.AllowAnonymous<TBuilder> 方法

定義

藉由將 新增 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

原始慣例產生器參數。

適用於