mit_lti_flask_sample icon indicating copy to clipboard operation
mit_lti_flask_sample copied to clipboard

Serve multiple LTI provider with one flask application

Open MatthiasWiesner opened this issue 6 years ago • 1 comments

With this pull request, multiple LTI providers are to be served with one flask application.

In order to be able to run multiple LTI providers from one flask application, it is necessary to store the LTI properties of the different LTI providers independently of the flask session. If the LTI properties of an LTI provider are saved in the flask session, they will be overwritten by their LTI properties when using another LTI provider.

The LTI properties are stored as LTI session objects in a database. Only the user_id is stored in the flask session. The assignment of a flask request to the LTI session object happens via the flask session's user_id and the request url path (https://<host>:<port>/<path>).

For this, the pylti/flask.py ​​decorator had to be modified accordingly (pyltiflask.py). This modification uses the configuration of the flask application and has therefore been integrated into the flask application.

MatthiasWiesner avatar Jul 17 '19 13:07 MatthiasWiesner

Hello, maybe you find this approach useful, then do not hesitate to write me for details. I can imagine that this pull request is hard to integrate, but maybe you can find the way I could not find.

MatthiasWiesner avatar Jul 17 '19 13:07 MatthiasWiesner