IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
643 stars 149 forks source link

Detail: Not found at request protected endpoint #61

Open Master-Y0da opened 3 years ago

Master-Y0da commented 3 years ago

I'm trying to send a request to the user example endpoint described in docs (I made some edits):

 @router.get('/users/me')
 def user(Authorize: AuthJWT = Depends()):
    Authorize.jwt_required()

    current_user = Authorize.get_jwt_subject()
    return JSONResponse({"response":{"user": current_user}}, status_code=status.HTTP_200_OK)

And getting this response:

{ "detail": "Not Found" }

Why is that ? ....When I look into the browser request the authorization token is send without problems...Please help! , thanks for your time!

markkkkas commented 3 years ago

Are you sure you accessing right endpoint? Please share your swagger or redoc page to see if routes appear.