(no description)
factor:: (18 methods):
generate_totp_uri()
generate_qrcode()
get_state()
setup_factor_form_definition()
setup_factor_form_definition_after_data()
setup_factor_form_validation()
login_form_definition()
login_form_validation()
validate_code()
generate_secret_code()
setup_user_factor()
get_all_user_factors()
has_revoke()
has_setup()
show_setup_buttons()
post_pass_state()
possible_states()
get_setup_string()
generate_totp_uri(string $secret) X-Ref |
Generates TOTP URI for given secret key. Uses site name, hostname and user name to make GA account look like: "Sitename hostname (username)". param: string $secret return: string |
generate_qrcode(string $secret) X-Ref |
Generates HTML sting with QR code for given secret key. param: string $secret return: string |
get_state() X-Ref |
TOTP state {@inheritDoc} |
setup_factor_form_definition(\MoodleQuickForm $mform) X-Ref |
TOTP Factor implementation. param: \MoodleQuickForm $mform return: \MoodleQuickForm $mform |
setup_factor_form_definition_after_data(\MoodleQuickForm $mform) X-Ref |
TOTP Factor implementation. param: \MoodleQuickForm $mform return: \MoodleQuickForm $mform |
setup_factor_form_validation(array $data) X-Ref |
TOTP Factor implementation. param: array $data return: array |
login_form_definition(\MoodleQuickForm $mform) X-Ref |
TOTP Factor implementation. param: \MoodleQuickForm $mform return: \MoodleQuickForm $mform |
login_form_validation(array $data) X-Ref |
TOTP Factor implementation. param: array $data return: array |
validate_code(string $code, int $window, TOTP $totp, stdClass $factor) X-Ref |
Checks the code for reuse, clock skew, and validity. param: string $code the code to check. param: int $window the window to check validity for. param: TOTP $totp the totp object to check against. param: stdClass $factor the factor with information required. return: string constant with verification state. |
generate_secret_code() X-Ref |
Generates cryptographically secure pseudo-random 16-digit secret code. return: string |
setup_user_factor(stdClass $data) X-Ref |
TOTP Factor implementation. param: stdClass $data return: stdClass the factor record, or null. |
get_all_user_factors($user) X-Ref |
TOTP Factor implementation. param: stdClass $user the user to check against. return: array |
has_revoke() X-Ref |
TOTP Factor implementation. {@inheritDoc} |
has_setup() X-Ref |
TOTP Factor implementation. {@inheritDoc} |
show_setup_buttons() X-Ref |
TOTP Factor implementation {@inheritDoc} |
post_pass_state() X-Ref |
TOTP Factor implementation. Empty override of parent. {@inheritDoc} |
possible_states(stdClass $user) X-Ref |
TOTP Factor implementation. TOTP cannot return fail state. param: stdClass $user |
get_setup_string() X-Ref |
TOTP Factor implementation. {@inheritDoc} |