API / Minn\Runtime / ApplicationPasswordRecords

ApplicationPasswordRecords final class

Minn\Runtime\ApplicationPasswordRecords · public/minn/src/Minn/Runtime/ApplicationPasswordRecords.php · 102 lines

A user's application passwords as WordPress's API keeps them (WP_Application_Passwords), over the engine's store (Minn\Auth\ApplicationPasswords, the reference's format): made, found, renamed, used, removed one by one or all together, with the reference's answers and actions.

Constants and properties

privateIN_USE = 'using_application_passwords'

The site option saying any password was made.

Public

staticinUse(): bool#

Whether any user has made an application password (is_in_use).

staticcreate(mixed $userId, mixed $args = array ( )): mixed#

A new password for the user (create_new_application_password): [the password, its record], or the reference's error for a nameless one.

staticall(mixed $userId): array#

A user's passwords (get_user_application_passwords).

@return list<array<string, mixed>>
staticfind(mixed $userId, mixed $uuid): ?array#

One of a user's passwords by its uuid (get_user_application_password), or null.

staticnameExists(mixed $userId, mixed $name): bool#

Whether one of a user's passwords has the name (application_name_exists_for_user).

staticupdate(mixed $userId, mixed $uuid, mixed $update = array ( )): mixed#

A password renamed, the only field the reference changes (update_application_password): true, or its not-found error.

staticrecordUsage(mixed $userId, mixed $uuid): mixed#

A use recorded, when and from where (record_application_password_usage): true, or the not-found error.

staticdelete(mixed $userId, mixed $uuid): mixed#

A password removed (delete_application_password): true, or the not-found error.

staticdeleteAll(mixed $userId): int#

Every password of the user removed, each told to wp_delete_application_password (delete_all_application_passwords); how many went.

Internals 2

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

privatenotFound(): mixed#
privatestore(): Minn\Auth\ApplicationPasswords#