Reference

Guide

$request->auth()

Returns the Auth object if authentication is set

$request->auth(): Kirby\Http\Request\Auth\BasicAuth|Kirby\Http\Request\Auth\BearerAuth|null

Return type

Kirby\Http\Request\Auth\BasicAuth|Kirby\Http\Request\Auth\BearerAuth|null

Source code

kirby/src/Http/Request.php#L160