ILIAS
release_8 Revision v8.19
|
Static Public Member Functions | |
static | isLtiMessage () |
Check whether the request received could be an LTI message. More... | |
static | getRequestParameters () |
Return GET and POST request parameters (POST parameters take precedence) More... | |
static | logError (string $message, bool $showSource=true) |
Log an error message. More... | |
static | logInfo (string $message, bool $showSource=false) |
Log an information message. More... | |
static | logDebug (string $message, bool $showSource=false) |
Log a debug message. More... | |
static | logRequest (bool $debugLevel=false) |
Log a request received. More... | |
static | logForm (string $url, array $params, string $method='POST', bool $debugLevel=false) |
Log a form submission. More... | |
static | log (string $message, bool $showSource=false) |
Log an error message irrespective of the logging level. More... | |
static | sendForm (string $url, array $params, string $target='') |
Generate a web page containing an auto-submitted form of parameters. More... | |
static | redirect (string $url, array $params) |
Redirect to a URL with query parameters. More... | |
static | getRandomString (int $length=8) |
Generate a random string. More... | |
static | stripHtml (string $html) |
Strip HTML tags from a string. More... | |
static | cloneObject (object $obj) |
Clone an object and any objects it contains. More... | |
static | logtxt (string $msg) |
Data Fields | |
const | LTI_VERSION1 = 'LTI-1p0' |
LTI version 1 for messages. More... | |
const | LTI_VERSION1P3 = '1.3.0' |
LTI version 1.3 for messages. More... | |
const | LTI_VERSION2 = 'LTI-2p0' |
LTI version 2 for messages. More... | |
const | JWT_CLAIM_PREFIX = 'https://purl.imsglobal.org/spec/lti' |
Prefix for standard JWT message claims. More... | |
const | MESSAGE_TYPE_MAPPING |
Mapping for standard message types. More... | |
const | JWT_CLAIM_MAPPING |
Mapping for standard message parameters to JWT claim. More... | |
const | LOGLEVEL_NONE = 0 |
No logging. More... | |
const | LOGLEVEL_ERROR = 1 |
Log errors only. More... | |
const | LOGLEVEL_INFO = 2 |
Log error and information messages. More... | |
const | LOGLEVEL_DEBUG = 3 |
Log all messages. More... | |
Static Public Attributes | |
static array | $LTI_VERSIONS = array(self::LTI_VERSION1, self::LTI_VERSION1P3, self::LTI_VERSION2) |
Permitted LTI versions for messages. More... | |
static array | $METHOD_NAMES |
List of supported message types and associated class methods. More... | |
static array | $requestParameters = null |
GET and POST request parameters. More... | |
static int | $logLevel = self::LOGLEVEL_NONE |
Current logging level. More... | |
|
static |
Clone an object and any objects it contains.
object | $obj | Object to be cloned |
Definition at line 590 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\parseClaims().
|
static |
Generate a random string.
The generated string will only comprise letters (upper- and lower-case) and digits.
int | $length | Length of string to be generated (optional, default is 8 characters) |
Definition at line 558 of file Util.php.
References $i.
Referenced by ILIAS\LTI\ToolProvider\addJWTSignature(), ilObjLTIConsumer\getNewClientId(), ILIAS\LTI\ToolProvider\ResourceLinkShareKey\save(), ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest(), and ILIAS\LTI\ToolProvider\Tool\sendRelaunchRequest().
|
static |
Return GET and POST request parameters (POST parameters take precedence)
Definition at line 224 of file Util.php.
References $DIC, $param, $post, $query, and ILIAS\Repository\$refinery.
Referenced by ILIAS\LTI\ToolProvider\Tool\getPlatformConfiguration(), ILIAS\LTI\ToolProvider\Platform\handleAuthenticationRequest(), ILIAS\LTI\ToolProvider\Platform\handleRequest(), ILIAS\LTI\ToolProvider\Tool\handleRequest(), ILIAS\LTI\ToolProvider\Platform\onAuthenticate(), and ILIAS\LTI\ToolProvider\Tool\sendRegistration().
|
static |
Check whether the request received could be an LTI message.
Definition at line 196 of file Util.php.
References $DIC.
|
static |
|
static |
Log a debug message.
string | $message | Message to be logged |
bool | $showSource | True if the name and line number of the current file are to be included |
Definition at line 363 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Http\HttpMessage\getHttpClient(), ILIAS\LTI\ToolProvider\Jwt\Jwt\getJwtClient(), ILIAS\LTI\ToolProvider\Context\getMembership(), ILIAS\LTI\ToolProvider\ResourceLink\getMembership(), ILIAS\LTI\ToolProvider\Context\hasMembershipService(), ILIAS\LTI\ToolProvider\ResourceLink\hasMembershipService(), ILIAS\LTI\ToolProvider\Http\HttpMessage\setHttpClient(), and ILIAS\LTI\ToolProvider\Jwt\Jwt\setJwtClient().
|
static |
Log an error message.
string | $message | Message to be logged |
bool | $showSource | True if the name and line number of the current file are to be included |
Definition at line 337 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Platform\handleRequest(), ILIAS\LTI\ToolProvider\Tool\handleRequest(), ILIAS\LTI\ToolProvider\Http\HttpMessage\send(), ILIAS\LTI\ToolProvider\Jwt\FirebaseClient\sign(), and ILIAS\LTI\ToolProvider\Jwt\FirebaseClient\verify().
|
static |
Log a form submission.
string | $url | URL to which the form should be submitted |
array | $params | Array of form parameters |
string | $method | HTTP Method used to submit form (optional, default is POST) |
bool | $debugLevel | True if the form details should always be logged (optional, default is false to use current log level) |
Definition at line 411 of file Util.php.
References $message.
|
static |
Log an information message.
string | $message | Message to be logged |
bool | $showSource | True if the name and line number of the current file are to be included |
Definition at line 350 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Tool\checkValue(), and ILIAS\LTI\ToolProvider\Http\HttpMessage\send().
|
static |
Log a request received.
bool | $debugLevel | True if the request details should be logged at the debug level (optional, default is false for information level) |
Definition at line 375 of file Util.php.
References $message, and $params.
Referenced by ILIAS\LTI\ToolProvider\Platform\handleRequest(), ILIAS\LTI\ToolProvider\Tool\handleRequest(), and ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest().
|
static |
|
static |
Redirect to a URL with query parameters.
string | $url | URL to which the form should be submitted |
array | $params | Array of form parameters |
Definition at line 523 of file Util.php.
References ILIAS\LTI\ToolProvider\$key, and exit.
Referenced by ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest().
|
static |
Generate a web page containing an auto-submitted form of parameters.
string | $url | URL to which the form should be submitted |
array | $params | Array of form parameters |
string | $target | Name of target (optional) |
Definition at line 466 of file Util.php.
References ILIAS\LTI\ToolProvider\$key, ILIAS\Repository\form(), and ILIAS\Repository\html().
Referenced by ILIAS\LTI\ToolProvider\Platform\handleAuthenticationRequest(), ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest(), ILIAS\LTI\ToolProvider\sendMessage(), and ILIAS\LTI\ToolProvider\Tool\sendRelaunchRequest().
|
static |
Strip HTML tags from a string.
string | $html | HTML string to be stripped |
Definition at line 577 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Content\Item\toJsonObject().
|
static |
Current logging level.
Definition at line 189 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\DataConnector\DataConnector\fixPlatformSettings(), ILIAS\LTI\ToolProvider\DataConnector\DataConnector\fixToolSettings(), ILIAS\LTI\ToolProvider\Tool\getMessageParameters(), ILIAS\LTI\ToolProvider\Platform\handleRequest(), ILIAS\LTI\ToolProvider\Tool\handleRequest(), ILIAS\LTI\ToolProvider\Http\HttpMessage\send(), and ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest().
|
static |
Permitted LTI versions for messages.
Definition at line 161 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\checkMessage().
|
static |
List of supported message types and associated class methods.
Definition at line 166 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\doCallback().
|
static |
const ILIAS\LTI\ToolProvider\Util::JWT_CLAIM_MAPPING |
Mapping for standard message parameters to JWT claim.
Definition at line 58 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\getMessageClaims(), ilObjLTIConsumer\LTISignJWT(), and ILIAS\LTI\ToolProvider\parseClaims().
const ILIAS\LTI\ToolProvider\Util::JWT_CLAIM_PREFIX = 'https://purl.imsglobal.org/spec/lti' |
Prefix for standard JWT message claims.
Definition at line 43 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\addJWTSignature(), ILIAS\LTI\ToolProvider\getMessageClaims(), ILIAS\LTI\ToolProvider\parseClaims(), and ILIAS\LTI\ToolProvider\parseMessage().
const ILIAS\LTI\ToolProvider\Util::LOGLEVEL_DEBUG = 3 |
Log all messages.
Definition at line 156 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\DataConnector\DataConnector\fixPlatformSettings(), ILIAS\LTI\ToolProvider\DataConnector\DataConnector\fixToolSettings(), ILIAS\LTI\ToolProvider\Tool\getMessageParameters(), ILIAS\LTI\ToolProvider\Platform\handleRequest(), and ILIAS\LTI\ToolProvider\Tool\handleRequest().
const ILIAS\LTI\ToolProvider\Util::LOGLEVEL_ERROR = 1 |
const ILIAS\LTI\ToolProvider\Util::LOGLEVEL_INFO = 2 |
Log error and information messages.
Definition at line 151 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Tool\sendAuthenticationRequest().
const ILIAS\LTI\ToolProvider\Util::LOGLEVEL_NONE = 0 |
No logging.
Definition at line 141 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Http\HttpMessage\send().
const ILIAS\LTI\ToolProvider\Util::LTI_VERSION1 = 'LTI-1p0' |
LTI version 1 for messages.
Definition at line 28 of file Util.php.
Referenced by ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ILIAS\LTI\ToolProvider\parseRoles(), and ILIAS\LTI\ToolProvider\Tool\result().
const ILIAS\LTI\ToolProvider\Util::LTI_VERSION1P3 = '1.3.0' |
LTI version 1.3 for messages.
Definition at line 33 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Tool\authenticate(), ILIAS\LTI\ToolProvider\Tool\getPlatformToRegister(), ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ILIAS\LTI\ToolProvider\signMessage(), and ILIAS\LTI\ToolProvider\Content\Item\toJson().
const ILIAS\LTI\ToolProvider\Util::LTI_VERSION2 = 'LTI-2p0' |
LTI version 2 for messages.
Definition at line 38 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Tool\authenticate(), and ILIAS\LTI\ToolProvider\Service\Membership\getMembers().
const ILIAS\LTI\ToolProvider\Util::MESSAGE_TYPE_MAPPING |
Mapping for standard message types.
Definition at line 48 of file Util.php.
Referenced by ILIAS\LTI\ToolProvider\Tool\getConfiguration(), ILIAS\LTI\ToolProvider\getMessageClaims(), ilObjLTIConsumer\LTISignJWT(), and ILIAS\LTI\ToolProvider\parseClaims().