AllowAnonymousAttribute Class

Specifies that the class or method that this attribute is applied to does not require authorization.

Namespace
Microsoft.AspNetCore.Authorization
Assemblies
  • Microsoft.AspNetCore.Authorization

Syntax

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class AllowAnonymousAttribute : Attribute, _Attribute, IAllowAnonymous
class Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute