Nexus API Reference

Authorizer

Tags
psalm-api

Custom policy hook for #[Authorize(MyPolicy::class)]. Returns true to allow, false to deny (yielding 403). The request is provided so policies can inspect path params, headers, or other request state.

Implementations should be stateless — the framework may cache one instance per handler.

Table of Contents

Methods

authorize()  : bool

Methods

authorize()

public authorize(Principal $principal, ServerRequestInterface $request) : bool
Parameters
$principal : Principal
$request : ServerRequestInterface
Return values
bool

        
On this page

Search results