[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/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
 wp-includes/class-phpass.php

Defines 7 functions

  generate_recovery_mode_token()
  generate_and_store_recovery_mode_key()
  validate_recovery_mode_key()
  clean_expired_keys()
  remove_key()
  get_keys()
  update_keys()

Functions
Functions that are not part of a class:

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

return: string A random string to identify its associated key in storage.
since: 5.2.0

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

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

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.

return: true|WP_Error True on success, error object on failure.
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.
since: 5.2.0

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

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

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

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

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

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

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

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



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1