This package has been abandoned in favor of the more up-to-date (and user-friendly) smtech/reflexive-canvas-lti (or the even more capable, albeit more idiosyncratic, smtech/stmarks-reflexive-canvas-lti.)
This is a starter template for projects that want to…
This came about as a result of Hack Night at InstructureCon 2015, when it became clear to me that desire to both authenticate users and access the API using OAuth-provided tokens was more than could be done through simple OAuth authentication. (Well, it can be done, but it generates two OAuth tokens in the user's account and causes them to think that they are being logged in twice: once to authenticate their identity (which can be persistent -- "check to remember this login") and once to generate an API key. This seemed confusing, at best.)
composer install
(Composer rocks) -- this has a few dependencies defined in composer.json.https://<install-url>/admin/
and you will run the install script. You will need to have your MySQL credentials handy, as well as your Canvas developer credentials. Answer whatever questions it asks. This will generate a secrets.xml
file for you (if you don't want to make one yourself, based on secrets-example.xml) and it will password-protect the admin
directory.
https://<install-url>/admin/
thereafter, you will be redirected to consumers.php which provides some rudimentary LTI Consumer management for the tool.$metadata
keys, along with some default values and the validation regexes (which the AppMetadata object may start actually using eventually). A lot of other possible keys are evident in config.xml.$_SESSION
variable with relevant information):
SimpleXMLElement $secrets
, the secrets.xml file.mysqli $sql
, a database connection to your MySQL server.AppMetadata $metadata
, an associative array bound to the app_metadata table in your database.https://<install-url>/config.xml
and a key and secret from https://<install-url>/admin/consumers.php
.
*.inc.php
and secrets.xml
and it forces config.xml to be treated by Apache as a PHP file.I'm working hard to try to leave the master fork of this repository in vaguely working order (that is: it should "just work" if you use it). But I am continuing to actively tweak and update this template based on my own usage of it in other projects in the develop fork, for those not risk-averse or just simply curious.
Since GitHub doesn't allow one to fork one's own repositories into new projects in the same account, it may be interesting to list a few of my projects that draw on (or have been updated by) this starter project: