Izumi-kun / LTI-Tool-Provider-Library-PHP

LTI Tool Provider library for PHP
Apache License 2.0
21 stars 6 forks source link

Test 7.1 Valid request #8

Closed jozefbriss closed 6 years ago

jozefbriss commented 6 years ago

7.1 Requests for a Tool Consumer Profile A request for a Tool Consumer profile is made by sending a GET request to the URL provided in the requested custom parameter from a basic launch request for the same Tool Consumer. A query parameter should be added to the URL to specify the LTI version for which the profile is being requested; in this case a value of LTI-1p2 should be used. For example:

GET /lti/ToolConsumerProfile?lti_version=LTI-1p2 HTTP/1.0 .....

https://github.com/Izumi-kun/LTI-Tool-Provider-Library-PHP/blob/ad59f80b10aee450736c81377983a8532d7a4fa1/src/ToolProvider/ToolProvider.php#L946

Maybe somethin like this:

$url = $_POST['custom_tc_profile_url']; $url .= (strpos($url, "?") !== false ? "&" : "?")."lti_version=".$_POST['lti_version']; $http = new HTTPMessage($url, 'GET', null, 'Accept: application/vnd.ims.lti.v2.toolconsumerprofile+json');

Test 7.1 Valid request (passed) Applies to: 1.2 [required] Expected result: This test checks the request made for the Tool Consumer Profile to ensure it is valid

Izumi-kun commented 6 years ago

Also applies to 2.0 (ToolProxyRegistrationRequest).