This class exposes functions for LTI Dynamic Registration.
More...
|
| config_to_registration (object $config, int $typeid, object $type=null) |
| Transforms a moodle LTI 1.3 Config to an OAuth/LTI Client Registration.
|
|
| get_tool_proxy (int $proxyid) |
| Returns a tool proxy.
|
|
| lti_get_service_scopes () |
| Initializes an array with the scopes for services supported by the LTI module.
|
|
| new_clientid () |
| Generates a new client id string.
|
|
| registration_to_config (array $registrationpayload, string $clientid) |
| Transforms an LTI 1.3 Registration to a Moodle LTI Config.
|
|
| sign (string $key, string $salt, string $secret) |
| Base64 encoded signature for LTI 1.1 migration.
|
|
| validate_registration_token (string $registrationtokenjwt) |
| Validates the registration token is properly signed and not used yet.
|
|
|
static | get () |
| Get an instance of this helper.
|
|
|
const | REG_TOKEN_OP_NEW_REG = 'reg' |
| Indicates the token is to create a new registration.
|
|
const | REG_TOKEN_OP_UPDATE_REG = 'reg-update' |
| Indicates the token is to update an existing registration.
|
|
const | SCOPE_LINEITEM = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem' |
| lineitem full access scope
|
|
const | SCOPE_LINEITEM_RO = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly' |
| lineitem read-only scope
|
|
const | SCOPE_NRPS = 'https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly' |
| Names and Roles (membership) scope.
|
|
const | SCOPE_RESULT = 'https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly' |
| result scope
|
|
const | SCOPE_SCORE = 'https://purl.imsglobal.org/spec/lti-ags/scope/score' |
| score scope
|
|
const | SCOPE_TOOL_SETTING = 'https://purl.imsglobal.org/spec/lti-ts/scope/toolsetting' |
| Tool Settings scope.
|
|
This class exposes functions for LTI Dynamic Registration.
- Copyright
- 2020 Claude Vervoort (Cengage), Carlos Costa, Adrian Hutchinson (Macgraw Hill)
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ config_to_registration()
mod_lti\local\ltiopenid\registration_helper::config_to_registration |
( |
object | $config, |
|
|
int | $typeid, |
|
|
object | $type = null ) |
Transforms a moodle LTI 1.3 Config to an OAuth/LTI Client Registration.
- Parameters
-
object | $config | Moodle LTI Config. |
int | $typeid | which is the LTI deployment id. |
object | $type | tool instance in case the tool already exists. |
- Return values
-
array | the Client Registration as an associative array. |
◆ get()
static mod_lti\local\ltiopenid\registration_helper::get |
( |
| ) |
|
|
static |
Get an instance of this helper.
- Return values
-
◆ get_tool_proxy()
mod_lti\local\ltiopenid\registration_helper::get_tool_proxy |
( |
int | $proxyid | ) |
|
Returns a tool proxy.
- Parameters
-
- Return values
-
◆ lti_get_service_scopes()
mod_lti\local\ltiopenid\registration_helper::lti_get_service_scopes |
( |
| ) |
|
Initializes an array with the scopes for services supported by the LTI module.
- Return values
-
◆ new_clientid()
mod_lti\local\ltiopenid\registration_helper::new_clientid |
( |
| ) |
|
Generates a new client id string.
- Return values
-
string | generated client id |
◆ registration_to_config()
mod_lti\local\ltiopenid\registration_helper::registration_to_config |
( |
array | $registrationpayload, |
|
|
string | $clientid ) |
Transforms an LTI 1.3 Registration to a Moodle LTI Config.
- Parameters
-
array | $registrationpayload | the registration data received from the tool. |
string | $clientid | the clientid to be issued for that tool. |
- Return values
-
object | the Moodle LTI config. |
◆ sign()
mod_lti\local\ltiopenid\registration_helper::sign |
( |
string | $key, |
|
|
string | $salt, |
|
|
string | $secret ) |
Base64 encoded signature for LTI 1.1 migration.
- Parameters
-
string | $key | LTI 1.1 key |
string | $salt | Salt value |
string | $secret | LTI 1.1 secret |
- Return values
-
◆ validate_registration_token()
mod_lti\local\ltiopenid\registration_helper::validate_registration_token |
( |
string | $registrationtokenjwt | ) |
|
Validates the registration token is properly signed and not used yet.
Return the client id to use for this registration.
- Parameters
-
string | $registrationtokenjwt | registration token |
- Return values
-
array | with 2 keys: clientid for the registration, type but only if it's an update |
The documentation for this class was generated from the following file: