Nexus API Reference

Authenticator

Tags
psalm-api

Verifies request credentials and returns a Principal, or null for anonymous. Implementations MUST swallow all credential validation failures (bad signature, expired, malformed) and return null — never throw on a bad token. Exceptions are reserved for configuration errors (missing key, broken backend).

The middleware never 401s based on null — that decision belongs to AuthorizationMiddleware based on route attributes.

Table of Contents

Methods

authenticate()  : Principal|null

Methods

authenticate()

public authenticate(ServerRequestInterface $request) : Principal|null
Parameters
$request : ServerRequestInterface
Return values
Principal|null

        
On this page

Search results