Table of Contents

Class AuthorizePermissionsAttribute

Namespace
adas_core.Authentication.Attributes
Assembly
adas-core.Authentication.dll
public class AuthorizePermissionsAttribute : Attribute, IAuthorizationFilter, IFilterMetadata
Inheritance
AuthorizePermissionsAttribute
Implements
Inherited Members
Extension Methods

Constructors

AuthorizePermissionsAttribute(IUserService)

public AuthorizePermissionsAttribute(IUserService userService)

Parameters

userService IUserService

Methods

OnAuthorization(AuthorizationFilterContext)

Handles authorization by validating the presence of the Displayid request header and ensuring the authenticated user exists in the user service. If the header is missing or the user cannot be found, the request is short-circuited with a NotFoundObjectResult.

public void OnAuthorization(AuthorizationFilterContext context)

Parameters

context AuthorizationFilterContext

The AuthorizationFilterContext for the current request, providing access to the HTTP context, user identity, and the ability to set the action result.