Merge helper function to get current user integrated with the JWT plugin #34
Labels
security-alert
identified as a security vulnerability and requires immediate resolution and pushed downstream
wontfix
This will not be worked on
The FastAPI-JWT plugin provides a basic usage example which demonstrates using the
Authorize: AuthJWT = Depends()
dependency to get a handle on the JWT plugin instance, and then use theAuthorize.jwt_required()
function to protect endpoints.Since we will be doing this across the application, the following utility function could wrap the entire process up and ultimately return the currently logged in user:
a demonstration of using it in the
/me
endpointThis example was developed as part of the first application developed using this template and we should merge these ideas into the base template
The text was updated successfully, but these errors were encountered: