Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Documentation for Flask cache data storage #121

Open
dgwn opened this issue Sep 7, 2023 · 0 comments
Open

Fix Documentation for Flask cache data storage #121

dgwn opened this issue Sep 7, 2023 · 0 comments

Comments

@dgwn
Copy link

dgwn commented Sep 7, 2023

In the README.rst, the following reference block for Flask refers to DjangoOIDCLogin and DjangoMessageLaunch methods:

Flask cache data storage

from flask_caching import Cache
from pylti1p3.contrib.flask import FlaskCacheDataStorage

cache = Cache(app)

def login():
    ...
    launch_data_storage = FlaskCacheDataStorage(cache)
    oidc_login = DjangoOIDCLogin(request, tool_conf, launch_data_storage=launch_data_storage)

def launch():
    ...
    launch_data_storage = FlaskCacheDataStorage(cache)
    message_launch = DjangoMessageLaunch(request, tool_conf, launch_data_storage=launch_data_storage)

def restore_launch():
    ...
    launch_data_storage = FlaskCacheDataStorage(cache)
    message_launch = DjangoMessageLaunch.from_cache(launch_id, request, tool_conf,
                                                    launch_data_storage=launch_data_storage)

It should be fixed to refer to the correct Flask methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant