Created
March 17, 2022 21:38
-
-
Save 123andy/f023c6ece3157be9062a674771cbc02d to your computer and use it in GitHub Desktop.
Example template for a context token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getContextToken ( | |
$project_id = null, | |
$record = null, | |
$event_id = null, | |
$module_prefix = self::_PREFIX, | |
$custom = [], | |
$duration_valid_in_mins = 5 | |
) { | |
// refactor to allow passing parameters in an array as a single argument as well | |
// use database salt to prevent cross-site issues | |
... | |
return $context_token; | |
} | |
function validateContextToken($context_token, | |
) { | |
$project_id = null, | |
$record = null, | |
$event_id = null, | |
$module_prefix = self::_PREFIX, | |
$custom = [], | |
... | |
return true|false | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment