[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Error Protection API: WP_Recovery_Mode_Key_Service class

File Size: 192 lines (5 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.

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 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 : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref