Nexus API Reference

Authorize
in package

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 { … }

Table of Contents

Properties

$authorizer  : string

Methods

__construct()  : mixed

Attributes

#[Attribute]

#[Attribute]

Properties

Methods

__construct()

public __construct(Authorizer> $authorizer) : mixed
Parameters
$authorizer : Authorizer>

        
On this page

Search results