-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add middleware to pull out auth state from the JWT. #183
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
|
||
|
||
def create_app() -> Quart: | ||
app: Quart = Quart(__name__) | ||
app.request_class = UmaAuthRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yunyuyunyu let me know if there's a more correct way to do this. I feel like I'm missing something because I still need to cast to this type in wrappers.py. Not sure if I'm actually getting the benefit of this line as a result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't set it, in require_auth
the request
you are getting most likely will not be a UmaAuthRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem to be working for me in unit tests and when running locally, so I think this is right?
|
||
|
||
def create_app() -> Quart: | ||
app: Quart = Quart(__name__) | ||
app.request_class = UmaAuthRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't set it, in require_auth
the request
you are getting most likely will not be a UmaAuthRequest
b5b0307
to
7ad8496
Compare
7ad8496
to
41205af
Compare
23fc389
to
9de4c2b
Compare
Also refactoring the frontend's API to a blueprint for better modularization in the process.