$auth->currentUserFromBasicAuth()
Returns the logged in user by checking for a basic authentication header with valid credentials
Parameters
Name | Type | Default |
---|---|---|
$auth | Kirby\Http\Request\Auth\BasicAuth |
null |
Return type
Kirby\Cms\User
|null
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
if the authorization header is invalid |
Kirby\Exception\PermissionException |
if basic authentication is not allowed |