111 questions
-1
votes
1
answer
68
views
Generating Keys
Using PyJWT, how do you generate a new key from scratch?
I cannot find a single example of how to do this in PyJWT. I can find examples with jwcrypto, but porting that looks tedious at best.
EDIT: I'm ...
0
votes
1
answer
494
views
Poetry - ModuleNotFoundError: No module named jwt
Added PyJWT pkg to the project but getting error that the module is not found. I added the pkg using the poetry add command from a private repository.
from jwt import decode, get_unverified_header
alg ...
0
votes
0
answers
211
views
Can't decode JWT on Dart using dart_jsonwebtoken library
I am trying to set up a JWT auth system for a website. On the server side(where I use Python/Flask) I generate the token using the library PyJWT. On the frontend/app I am using Flutter(dart) with the ...
0
votes
0
answers
34
views
Can't retrieve token from angular side, but it works fine in postman - JWT not shown in 'application' browser tab - Django - Angular
I trying to make login page and home page with django and angular, it logged in well, but once i try to retrieve the logged in user from angular it shows me 403 (Forbidden)
but it works fine in ...
0
votes
1
answer
190
views
Authenticated and Non-authenticated Verification Path in FastAPI
So using FastAPI PyJWT, I'm struggling to make this work
user_dep = Annotated[Dict,Depends(api.get_current_user)]
@app.get('/')
async def home(request: Request,user:user_dep=Optional[models....
0
votes
1
answer
2k
views
jose.exception.JWTError: not enough segments,
I want to find out how to fix this error. I'm using python-jose(Poetry) in FastAPI. (I apologize if there have mistake in my sentences, because I don't use Google Translate, to improve my English ...
0
votes
1
answer
74
views
Flask not detecting static files when I use web token in route function
I am trying to confirm user email using pyjwt. So basically, when a new user registers, the user receives a confirmation email containing a link, and the user clicks the link to confirm the email.
If ...
0
votes
1
answer
973
views
PyJWT encode raise "Could not deserialize key data."
I use this code before and it was OK, but after months it does not work. This code suggested by pyjwt documentation without any changes.
I am using XUBUNTU and dockerized my project.
import jwt
SEC = &...
0
votes
1
answer
76
views
Sending foreign key as argument resulting in This Field is Required Error
I am trying to create an app where Users can login and create tasks. The code for my django app is hosted here
I am using JWT authentication and drf-yasg to generate swagger. So the TaskSerializer ...
2
votes
2
answers
15k
views
'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
Getting error 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers when installing a package with pip. The package is an internal package but ...
0
votes
1
answer
247
views
AWS Lambda works but Lambda@Edge throws error
I have written a python lambda to redirect unauthorized users to Cognito. The lambda works when I run a test event in the lambda console, but when I try to hit the CloudFront distribution, I get the ...
1
vote
1
answer
74
views
Update a class method default arg if the class it call by another package
I need to update a kwarg for a class method which is called by another package.
I interact with PyJWT encode much later this calls cryptography load_pem_private_key (https://cryptography.io/en/latest/...
1
vote
0
answers
118
views
JWT token in String or JSON format in Flask app
So I am having trouble with JWT tokens. After my token runs trough function to decode it it is supposed to return some data from SQLAlchemy database. But instead of data I get <__main__.SortRules ...
3
votes
2
answers
9k
views
JWT decode requires audience #870
I tried to use the documentation found in here: https://pyjwt.readthedocs.io/en/latest/usage.html#retrieve-rsa-signing-keys-from-a-jwks-endpoint related to the validation of a JWT token using JWKS but ...
0
votes
0
answers
721
views
Parse a JWT Token issued by a Java application, inside a python script
I have a Java Spring boot API that a user logs in and is issued a JWT token ( i cant change this code). I have a new python API that needs to parse the JWT to verify its been authenticated.
Java Code
...