Gerald, thanks again.
The first link, I've followed the steps, but I can't find the "lti2_consumer" table in my Homestead database. (I have to use Homestead for the time being).
The second, I've git-pulled now into my working project. I'm just not sure how to apply it to my code.
The third link, I appreciate the example, though I don't want to write my own LTI from scratch.
The fourth, it’s informative like the Passport documentation. Though sadly I don’t think my project will allow me the timeframe to build my own LTI, unless it’s absolutely necessary.
Maybe it’d help if I were more specific. In my past projects, I get information from Canvas via making cURL requests to Canvas endpoints. e.g.
$courseURL = "https://my.test.instructure.com/api/v1/courses";
$myToken = $this->token; //"13518~bCaXKavhv1N2tZ7d2eZ6bQ1k2TisiYyVHEBN2XiEuL1mBOJplS4fi7kOrhPiaIbG"; //$this->token;
$headers = ["Authorization: Bearer " . $myToken];
$curl = curl_init();
CURLOPT_RETURNTRANSFER => TRUE,
CURLINFO_HEADER_OUT => TRUE,
CURLOPT_URL => $courseURL,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_SSL_VERIFYPEER => TRUE,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HEADER => TRUE
As best as I understand it, this is how I can code a program that can interact with Canvas and retrieve data. But none of the documentation I’ve seen on Canvas suggests anything similar, or anything possible. I’m not sure how to make head to toe of even its LTI documentation as a result; how exactly is code supposed to look like for it?
I've been reviewing the Canvas documentation of OAuth2 endpoints, as in this link.
From here, it shows this example of what a redirect example looks like:
I'm having trouble developing my own OAuth2 redirect right now: to help pinpoint the problem, I want to confirm if I understand this part correctly. In my example, could it look like this?
Or even like this?
Any clarity would be greatly appreciated.