Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Serve multiple LTI provider with one flask application#41

Open
MatthiasWiesner wants to merge 2 commits into
mitodl:masterfrom
openHPI:master
Open

Serve multiple LTI provider with one flask application#41
MatthiasWiesner wants to merge 2 commits into
mitodl:masterfrom
openHPI:master

Conversation

@MatthiasWiesner
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant