$basicAuthMethod->isEnabled()
Checks whether the current request attempts to use HTTP basic authentication
$basicAuthMethod->isEnabled(BasicAuth|null $header = null, bool $fail = false): bool
Parameters
| Name | Type | Default |
|---|---|---|
| $header | Kirby\Http\Request\Auth\BasicAuthornull |
null
|
| $fail | bool |
false
|
Return type
bool
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
if the authorization header is invalid |
Kirby\Exception\PermissionException |
if basic authentication is not allowed |