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
Open
Serve multiple LTI provider with one flask application#41MatthiasWiesner wants to merge 2 commits into
MatthiasWiesner wants to merge 2 commits into
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_idis stored in the flask session. The assignment of a flask request to the LTI session object happens via the flask session'suser_idand 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.