Nexus API Reference

FromPrincipal
in package

Read onlyYes
FinalYes
Tags
psalm-api

Constructor parameter attribute — injects the Principal stamped by AuthenticationMiddleware onto the request. Mirrors #[FromActor] / #[FromService] / #[FromBody] in nexus-http.

Recognized by patched nexus-http/HandlerResolver and nexus-http-ws/HandlerInstantiator via class-string lookup, so this package doesn't need to be imported by those.

public function __construct( #[FromPrincipal] private readonly Principal $principal, ) }

Attributes
#[Attribute]
\Attribute::TARGET_PARAMETER

Table of Contents

On this page
  • Table Of Contents

Search results