Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

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

Defines 1 class

migration_claim:: (7 methods):
  __construct()
  verify_signature()
  get_consumer_key()
  get_user_id()
  get_context_id()
  get_tool_consumer_instance_guid()
  get_resource_link_id()


Class: migration_claim  - X-Ref

The migration_claim class, instances of which represent information passed in an 'lti1p1' migration claim.

Provides validation and data retrieval for the claim.

See https://www.imsglobal.org/spec/lti/v1p3/migr#lti-1-1-migration-claim

__construct(array $claim, string $deploymentid, string $platform, string $clientid, string $exp,string $nonce, legacy_consumer_repository $legacyconsumerrepo)   X-Ref
The migration_claim constructor.

param: array $claim the array of claim data, as received in a resource link launch.
param: string $deploymentid the deployment id included in the launch.
param: string $platform the platform included in the launch.
param: string $clientid the client id included in the launch.
param: string $exp the exp included in the launch.
param: string $nonce the nonce included in the launch.
param: legacy_consumer_repository $legacyconsumerrepo  a legacy consumer repository instance.

verify_signature(string $consumerkey, string $signature, string $deploymentid, string $platform,string $clientid, string $exp, string $nonce)   X-Ref
Verify the claim signature by recalculating it using the launch data and locally stored consumer secret.

return: bool true if the signature was verified, false otherwise.
param: string $consumerkey the LTI 1.1 consumer key.
param: string $signature a signature of the LTI 1.1 consumer key and associated launch data.
param: string $deploymentid the deployment id included in the launch.
param: string $platform the platform included in the launch.
param: string $clientid the client id included in the launch.
param: string $exp the exp included in the launch.
param: string $nonce the nonce included in the launch.

get_consumer_key()   X-Ref
Return the consumer key stored in the claim.

return: string the consumer key included in the claim.

get_user_id()   X-Ref
Return the LTI 1.1 user id stored in the claim.

return: string|null the user id, or null if not provided in the claim.

get_context_id()   X-Ref
Return the LTI 1.1 context id stored in the claim.

return: string|null the context id, or null if not provided in the claim.

get_tool_consumer_instance_guid()   X-Ref
Return the LTI 1.1 tool consumer instance GUID stored in the claim.

return: string|null the tool consumer instance GUID, or null if not provided in the claim.

get_resource_link_id()   X-Ref
Return the LTI 1.1 resource link id stored in the claim.

return: string|null the resource link id, or null if not provided in the claim.