[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/ -> class-wp-recovery-mode-key-service.php (summary)

Error Protection API: WP_Recovery_Mode_Key_Service class

File Size: 183 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file

Defines 7 functions


Functions that are not part of a class:

generate_recovery_mode_token()   X-Ref
Creates a recovery mode token.

return: string $token A random string to identify its associated key in storage.

generate_and_store_recovery_mode_key( $token )   X-Ref
Creates a recovery mode key.

param: string $token A token generated by {@see generate_recovery_mode_token()}.
return: string $key Recovery mode key.

validate_recovery_mode_key( $token, $key, $ttl )   X-Ref
Verifies if the recovery mode key is correct.

Recovery mode keys can only be used once; the key will be consumed in the process.

param: string $token The token used when generating the given key.
param: string $key   The unhashed key.
param: int    $ttl   Time in seconds for the key to be valid for.
return: true|WP_Error True on success, error object on failure.

clean_expired_keys( $ttl )   X-Ref
Removes expired recovery mode keys.

param: int $ttl Time in seconds for the keys to be valid for.

remove_key( $token )   X-Ref
Removes a used recovery key.

param: string $token The token used when generating a recovery mode key.

get_keys()   X-Ref
Gets the recovery key records.

return: array Associative array of $token => $data pairs, where $data has keys 'hashed_key'

update_keys( array $keys )   X-Ref
Updates the recovery key records.

param: array $keys Associative array of $token => $data pairs, where $data has keys 'hashed_key'
return: bool True on success, false on failure.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1