Skip to content

Commit

Permalink
Examples moved to the separate repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-viskov committed Mar 23, 2020
1 parent f0fb461 commit 85f6c13
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 1,284 deletions.
57 changes: 4 additions & 53 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,61 +27,12 @@ Library contains adapters for usage from Django Web Framework and Flask Web Fram

.. _PHP tool: https://github.com/IMSGlobal/lti-1-3-php-library

Example
=======
Usage examples
==============

First of all choose and configure test LTI 1.3 Platform. It may be:
Django: https://github.com/dmitry-viskov/pylti1.3-django-example

* `IMS Global test site`_
* `Canvas LMS`_ (Detailed `instruction`_ how to setup Canvas as LTI 1.3 Platform is `here`_)

.. _IMS Global test site: https://lti-ri.imsglobal.org
.. _Canvas LMS: https://github.com/instructure/canvas-lms
.. _instruction: https://github.com/dmitry-viskov/pylti1.3/wiki/Configure-Canvas-as-LTI-1.3-Platform
.. _here: https://github.com/dmitry-viskov/pylti1.3/wiki/Configure-Canvas-as-LTI-1.3-Platform

The most simple way to check example is to use ``docker`` + ``docker-compose``.
Change the necessary configs in the ``examples/configs/game.json`` (`here is instruction`_ how to generate your own public + private keys):

.. _here is instruction: https://github.com/dmitry-viskov/pylti1.3/wiki/How-to-generate-JWT-RS256-key-and-JWKS

.. code-block:: javascript
{
"<issuer>" : { // This will usually look something like 'http://example.com'
"client_id" : "<client_id>", // This is the id received in the 'aud' during a launch
"auth_login_url" : "<auth_login_url>", // The platform's OIDC login endpoint
"auth_token_url" : "<auth_token_url>", // The platform's service authorization endpoint
"key_set_url" : "<key_set_url>", // The platform's JWKS endpoint
"key_set": null, // in case if platform's JWKS endpoint somehow unavailable you may paste JWKS here
"private_key_file" : "<path_to_private_key>", // Relative path to the tool's private key
"deployment_ids" : ["<deployment_id>"] // The deployment_id passed by the platform during launch
}
}
and execute:

.. code-block:: shell
$ docker-compose up --build
You may use virtualenv instead of docker:

.. code-block:: shell
$ virtualenv venv
$ source venv/bin/activate
$ cd examples
$ pip install -r requirements.txt
$ cd game
$ python manage.py runserver 127.0.0.1:9001
Now there is game example tool you can launch into on the port 9001:

.. code-block:: shell
OIDC Login URL: http://127.0.0.1:9001/login/
LTI Launch URL: http://127.0.0.1:9001/launch/
Flask: https://github.com/dmitry-viskov/pylti1.3-flask-example

Configuration
=============
Expand Down
12 changes: 0 additions & 12 deletions examples/Dockerfile

This file was deleted.

7 changes: 7 additions & 0 deletions examples/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Examples
=========

Django: https://github.com/dmitry-viskov/pylti1.3-django-example

Flask: https://github.com/dmitry-viskov/pylti1.3-flask-example

27 changes: 0 additions & 27 deletions examples/configs/cert_suite_private.key

This file was deleted.

40 changes: 0 additions & 40 deletions examples/configs/game.json

This file was deleted.

51 changes: 0 additions & 51 deletions examples/configs/private.key

This file was deleted.

8 changes: 0 additions & 8 deletions examples/configs/public.jwk.json

This file was deleted.

14 changes: 0 additions & 14 deletions examples/configs/public.key

This file was deleted.

15 changes: 0 additions & 15 deletions examples/docker-compose.yml

This file was deleted.

Empty file removed examples/game/game/__init__.py
Empty file.
22 changes: 0 additions & 22 deletions examples/game/game/middleware.py

This file was deleted.

115 changes: 0 additions & 115 deletions examples/game/game/settings.py

This file was deleted.

Loading

0 comments on commit 85f6c13

Please sign in to comment.