-
Notifications
You must be signed in to change notification settings - Fork 184
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
How to integrate with Flask-JWT-Extended? #206
Comments
Since the scheduler only runs on a single worker you might find your app works better by using the scheduler as an api that the authenticated app (multi worker) can talk to. |
What do you mean with "using the scheduler as an api"? I did not get your comment 😔 |
Hey, Sorry: The flask appscheduler can be run as a standalone flask app. This can be separate from your main website. There is an api script: https://viniciuschiele.github.io/flask-apscheduler/rst/api.html So from your jwt app, a user can be authenticated, and once they are logged in, they can have access to routes that call the API. I built one here: https://github.com/atlas-bi/atlas-automation-hub, it has a "web app", "scheduler" > using flask app scheduler, and a "runner". My job are normally long running so I split them out from the scheduler so they don't bog it down. |
Thanks for the fast response. I started as you did in your project "re-implementing" RestAPI to manage jobs but what I wanted to know is if there is any way to implement a different auth method (JWT instead of HTTPBasicAuth) based on the example here. For example I expect to initialise scheduler with following parameters
and use something like the following function to authenticate the RestAPI call
|
Hello,
I do not find a way to integrate this library with Flask-JWT-Extended I am using in my backend. Does anyone have an example?
It works easily with the basic authentication example in the repo.
The text was updated successfully, but these errors were encountered: