Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 256 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: factor  - X-Ref

Token factor class.

has_input()   X-Ref
Token implementation.

{@inheritDoc}

get_all_user_factors(stdClass $user)   X-Ref
Token implementation.
This factor is a singleton, return single instance.

param: stdClass $user the user to check against.
return: array

get_state()   X-Ref
Token implementation.
Checks whether the user has selected roles in any context.

{@inheritDoc}

set_state($state)   X-Ref
Token Implementation.
We can't get_state like the parent here or it will recurse forever.

param: string $state the state constant to set
return: bool

possible_states(stdClass $user)   X-Ref
Token implementation.

param: stdClass $user
return: array

global_definition_after_data($mform)   X-Ref
Token implementation.
Inject a checkbox into every auth form if needed.

param: \MoodleQuickForm $mform Form to inject global elements into.
return: void

global_submit($data)   X-Ref
Token implementation.
Store information about the token status.

param: object $data Data from the form.
return: void

post_pass_state()   X-Ref
Token implementation.
Pass hook to set the cookie for use in subsequent auths.

{@inheritDoc}

calculate_expiry_time($basetime = null)   X-Ref
Calculate the expiry time of the token, based on configuration.

param: integer|null $basetime time to use for calcalations.
return: array