Nexus API Reference

Authorize
in package
implements AuthorizationRequirement

Read onlyYes
FinalYes
Tags
psalm-api

Custom policy delegation. AuthorizationMiddleware resolves the named class (via PSR-11 container or no-args construction) and calls Authorizer::authorize(Principal, ServerRequest). 403 if it returns false.

The referenced class MUST implement Authorizer. Validated at compile time — InvalidAuthorizerException at boot if not.

#[Authorize(OrderOwnerPolicy::class)] final class ShowOrderHandler { … }

Attributes
#[Attribute]
\Attribute::TARGET_CLASS

Table of Contents

Interfaces

AuthorizationRequirement

Properties

$authorizer  : string

Methods

__construct()  : mixed

Properties

Methods

__construct()

public __construct(Authorizer> $authorizer) : mixed
Parameters
$authorizer : Authorizer>
On this page

Search results