API / Minn\Runtime / ApplicationPasswordSignIn

ApplicationPasswordSignIn final class

Minn\Runtime\ApplicationPasswordSignIn · public/minn/src/Minn/Runtime/ApplicationPasswordSignIn.php · 85 lines

wp_authenticate_application_password as the reference answers it (probe application-passwords-api): a user found already stands; outside an API request (application_password_is_api_request) nothing is tried; then the user by login or email, the feature's availability (for the site, for the user), and each of the user's passwords, a match passing through wp_authenticate_application_password_errors, recorded, and announced (application_password_did_authenticate); every refusal announced through application_password_failed_authentication.

Public

staticauthenticate(mixed $input, string $username, string $password): mixed#

The signed-in user, the input unchanged, or the refusal.

staticvalidate(mixed $input): mixed#

determine_current_user's application password step: an earlier answer stands; else the user the REST request's application password signed in (the engine checked the password before plugins loaded), heard again as the reference hears it: the feature's availability, wp_authenticate_application_password_errors, then application_password_did_authenticate; a refusal is announced and leaves the request signed out.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privaterefusal(mixed $user, string $username): ?WP_Error#

Why the user may not sign in by application password, or null when they may.