You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an OAuth2 password flow authorization endpoint which is used to create a token. However if I inject AuthJWT as a dependency, the request will fail as there is an Authorization: Basic <basicauth in base64> header in the request, containing client_id and client_secret.
I would still like to use the utility functions create_access_token etc. So currently I just derive a dummy class like this:
class DummyAuthJWT(AuthJWT):
def __init__(self, req = None, res = None):
pass
.. and inject that so that I don't get the header verification exception.
Is there a cleaner way to access the token creation only?
The text was updated successfully, but these errors were encountered:
I have a similar need. I would like to generate tokens for an API service using a command line tool. So neither a request nor response will ever exist. Will try it with such a wrapper class.
I have an OAuth2 password flow authorization endpoint which is used to create a token. However if I inject AuthJWT as a dependency, the request will fail as there is an
Authorization: Basic <basicauth in base64>
header in the request, containing client_id and client_secret.I would still like to use the utility functions
create_access_token
etc. So currently I just derive a dummy class like this:.. and inject that so that I don't get the header verification exception.
Is there a cleaner way to access the token creation only?
The text was updated successfully, but these errors were encountered: