Class WebRouteRequireAuthAttribute
Namespace: TecnoPack.WebServer.JWT
Assembly: CO0002_Templ_FlowpackHMI_V00_26_M.dll
Specifies that a web route requires authentication before it can be accessed.
[AttributeUsage(AttributeTargets.Method)]
public class WebRouteRequireAuthAttribute : Attribute
Inheritance
object ← Attribute ← WebRouteRequireAuthAttribute
Remarks
This attribute can be applied to methods to enforce an authentication requirement with a specified access level. The mechanism that interprets this attribute (e.g., middleware or a custom route handler) is responsible for validating whether the current user meets the required authentication level.
Constructors
WebRouteRequireAuthAttribute(int)
Initializes a new instance of the
public WebRouteRequireAuthAttribute(int level)
Parameters
level int
The required authorization level for the associated route. This value is typically interpreted by authorization middleware to determine whether the current request is permitted.
Properties
Level
Gets the required authorization level needed to access the decorated route.
public int Level { get; }
Property Value
int