Questions tagged [python-jose]

A JOSE implementation in Python based on PyJWT.

21 questions
0
votes
0 answers

Can you store a JOSE token in localStorage?

I was reading about JWTs and how you shouldn't store them in localStorage - its insecure. But if it is encrypted with a server's private key, with the JOSE standard, can I store it in localStorage? Is that secure from XSS and other attacks that…
SamTheProgrammer
  • 1,051
  • 1
  • 10
  • 28
0
votes
1 answer

Uploading python-jose to cloud run fails

So I've created this Flask-app which is going to serve as my backend for a custom app. To handle the creation of JWT-tokens, I've decided upon using an encrypted JWS (a JWS inside of a JWE). For this, I've chosen to use the python-jose package. I've…
0
votes
0 answers

Python CLI fails silently on importing jwt

I have installed in a virtualenv both python-jose (3.2.0) and PyJWT (2.0.1), but with both my console script fails without any error message on importing jwt. Even from the CLI (Python 3.7.7 on Windows 10), both from jose import jwt and import…
Libra
  • 369
  • 4
  • 15
0
votes
1 answer

How to resolve 'Invalid PKCS8 header error' in AWS lambda

I am trying to perform jwt.encode on a small request message with a private key that I am retrieving from DynamoDB. My work station is Mac OS. The code works in my local environment but failed when I tried to execute it in AWS lambda python3.7…
user1655072
  • 572
  • 2
  • 10
  • 20
0
votes
1 answer

Is there a Python function for checking the length of an array?

I need to count the number of items in an array. Is there a function to do it? I can do it with a for loop but if there was a function it would be 100 times easier. arr1 = [10, 12, 87, 36, 11, 9, 73] for each in arr1: x += 1 print x
Berny
  • 44
  • 4
0
votes
1 answer

Why can't I sign these claims with my JWK?

I am writing this python code to create RSA private and public keys. Then create a JWK from the private key, then sign the claims with that JWK. #!/usr/bin/env python import time from jose import jwk from jose import jws from…
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
1
2