-
Hello 👋 |
Beta Was this translation helpful? Give feedback.
Answered by
prkumar
Feb 23, 2022
Replies: 1 comment 4 replies
-
Hey! One option is to use the Header argument annotation. If you need to prepend "Bearer" to the token returned by class MyConsumer(Consumer):
def get_user(self):
return self._get_user(f"Bearer {get_jwt()}")
@get("user")
def _get_user(self, token: Header("Authorization")):
pass |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jrvc1919
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
One option is to use the Header argument annotation.
If you need to prepend "Bearer" to the token returned by
get_jwt
, you could wrap the call. For example: