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
原始慣例產生器參數。