API / Minn\Auth / AuthFailure

AuthFailure final readonly class

Minn\Auth\AuthFailure · public/minn/src/Minn/Auth/AuthFailure.php · 26 lines

Why a request is not authenticated, as the reference's error code: a missing or invalid cookie, or a good one sent without a nonce, is rest_not_logged_in (the request is simply anonymous); a good cookie with a nonce that does not verify is rest_cookie_invalid_nonce. The reason tells a good cookie sent without its nonce apart: that request is nobody, whoever plugin code then names.

Constants and properties

constCOOKIE_WITHOUT_NONCE = 'a sign-in cookie without its nonce'
propreadonly string $code

Promoted from the constructor.

propreadonly string $reason

Promoted from the constructor.

Public

new__construct(string $code, string $reason = '')#
staticcookieWithoutNonce(): self#

A good sign-in cookie sent without the nonce that would let it vouch for its user.

staticnotLoggedIn(): self#

No usable session.

staticinvalidNonce(): self#

A session whose nonce did not verify.