|
| | __construct (Config $config, ElggSession $session, ElggCrypto $crypto) |
| | Constructor. More...
|
| |
| | execute ($action, $forwarder="") |
| | Executes an action If called from action() redirect will be issued by the response factory If called as /action page handler response will be handled by \Elgg\Router. More...
|
| |
| | register ($action, $filename="", $access='logged_in') |
| |
| | unregister ($action) |
| |
| | validateActionToken ($visible_errors=true, $token=null, $ts=null) |
| |
| | getActionTokenTimeout () |
| |
| | gatekeeper ($action) |
| |
| | validateTokenOwnership ($token, $timestamp, $session_token='') |
| | Was the given token generated for the session defined by session_token? More...
|
| |
| | generateActionToken ($timestamp, $session_token='') |
| | Generate a token from a session token (specifying the user), the timestamp, and the site key. More...
|
| |
| | exists ($action) |
| |
| | ajaxForwardHook ($hook, $reason, $forward_url, $params) |
| |
| | ajaxActionHook () |
| |
| | getAllActions () |
| | Get all actions. More...
|
| |
| | handleTokenRefreshRequest () |
| | Send an updated CSRF token, provided the page's current tokens were not fake. More...
|
| |
Definition at line 19 of file ActionsService.php.
◆ __construct()
◆ ajaxActionHook()
| Elgg\ActionsService::ajaxActionHook |
( |
| ) |
|
◆ ajaxForwardHook()
| Elgg\ActionsService::ajaxForwardHook |
( |
|
$hook, |
|
|
|
$reason, |
|
|
|
$forward_url, |
|
|
|
$params |
|
) |
| |
◆ execute()
| Elgg\ActionsService::execute |
( |
|
$action, |
|
|
|
$forwarder = "" |
|
) |
| |
Executes an action If called from action() redirect will be issued by the response factory If called as /action page handler response will be handled by \Elgg\Router.
- Parameters
-
| string | $action | Action name |
| string | $forwarder | URL to forward to after completion |
- Returns
- ResponseBuilder|null
- See also
- action @access private
Prepare action response
- Parameters
-
| string | $error_key | Error message key |
| int | $status_code | HTTP status code |
- Returns
- ResponseBuilder
Definition at line 84 of file ActionsService.php.
◆ exists()
| Elgg\ActionsService::exists |
( |
|
$action | ) |
|
◆ gatekeeper()
| Elgg\ActionsService::gatekeeper |
( |
|
$action | ) |
|
◆ generateActionToken()
| Elgg\ActionsService::generateActionToken |
( |
|
$timestamp, |
|
|
|
$session_token = '' |
|
) |
| |
Generate a token from a session token (specifying the user), the timestamp, and the site key.
- See also
- generate_action_token
- Parameters
-
| int | $timestamp | Unix timestamp |
| string | $session_token | Session-specific token |
- Returns
- string @access private
Definition at line 379 of file ActionsService.php.
◆ getActionTokenTimeout()
| Elgg\ActionsService::getActionTokenTimeout |
( |
| ) |
|
◆ getAllActions()
| Elgg\ActionsService::getAllActions |
( |
| ) |
|
◆ handleTokenRefreshRequest()
| Elgg\ActionsService::handleTokenRefreshRequest |
( |
| ) |
|
Send an updated CSRF token, provided the page's current tokens were not fake.
- Returns
- ResponseBuilder @access private
Definition at line 459 of file ActionsService.php.
◆ register()
| Elgg\ActionsService::register |
( |
|
$action, |
|
|
|
$filename = "", |
|
|
|
$access = 'logged_in' |
|
) |
| |
◆ unregister()
| Elgg\ActionsService::unregister |
( |
|
$action | ) |
|
◆ validateActionToken()
| Elgg\ActionsService::validateActionToken |
( |
|
$visible_errors = true, |
|
|
|
$token = null, |
|
|
|
$ts = null |
|
) |
| |
◆ validateTokenOwnership()
| Elgg\ActionsService::validateTokenOwnership |
( |
|
$token, |
|
|
|
$timestamp, |
|
|
|
$session_token = '' |
|
) |
| |
Was the given token generated for the session defined by session_token?
- Parameters
-
| string | $token | CSRF token |
| int | $timestamp | Unix time |
| string | $session_token | Session-specific token |
- Returns
- bool @access private
Definition at line 362 of file ActionsService.php.
◆ validateTokenTimestamp()
| Elgg\ActionsService::validateTokenTimestamp |
( |
|
$ts | ) |
|
|
protected |
Is the token timestamp within acceptable range?
- Parameters
-
| int | $ts | timestamp from the CSRF token |
- Returns
- bool
Definition at line 301 of file ActionsService.php.
The documentation for this class was generated from the following file: