See Release Notes
Long Term Support Release
(no description)
File Size: | 150 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
user_migration_claim:: (4 methods):
__construct()
verify_signature()
get_consumer_key()
get_user_id()
Class: user_migration_claim - X-Ref
A simplified representation of a 'https://purl.imsglobal.org/spec/lti/claim/lti1p1' migration claim.__construct(array $jwt, array $consumersecrets) X-Ref |
The migration_claim constructor. The signature of a migration claim must be verifiable. To achieve this, the constructor takes a list of secrets corresponding to the 'oauth_consumer_key' provided in the 'https://purl.imsglobal.org/spec/lti/claim/lti1p1' claim. How these secrets are determined is not the responsibility of this class. The constructor assumes these correspond. param: array $jwt the array of claim data, as received in a resource link launch JWT. param: array $consumersecrets a list of consumer secrets for the consumerkey included in the migration claim. |
verify_signature(string $consumerkey, string $signature, string $deploymentid, string $platform,string $clientid, string $exp, string $nonce, array $consumersecrets) X-Ref |
Verify the claim signature by recalculating it using the launch data and cross-checking consumer secrets. 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. param: array $consumersecrets the list of consumer secrets used with the given $consumerkey param return: bool true if the signature was verified, false otherwise. |
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 the user id, or null if not provided in the claim. |