Nexus API Reference

StaticTokenAuthenticator
in package
implements Authenticator

Read onlyYes
FinalYes
Tags
psalm-api

Map<token, Principal>. Use in tests and fixtures — never in production. No cryptographic verification, just a string-keyed lookup.

$auth = new StaticTokenAuthenticator([ 'k_alice' => new SimplePrincipal('alice', scopes: ['orders.read']), 'k_admin' => new SimplePrincipal('admin', roles: ['admin']), ]);

Table of Contents

Interfaces

Authenticator

Methods

__construct()  : mixed
authenticate()  : Principal|null

Methods


        
On this page

Search results