addisonwebb / apple-jwt-generator Goto Github PK
View Code? Open in Web Editor NEWEasily generate JWT for use with MapKit JS and MusicKit JS
Easily generate JWT for use with MapKit JS and MusicKit JS
First off, thanks for making this! I ran into the exact issues you mentioned in the introduction about how there's no clear instructions how to set this kinda thing up (especially if you're only used to front-end / app development like me).
I went through all the steps - I got some errors along the way saying I needed to install nose and tornado so installed those as well - but when I try to run the main.py file, I get this error:
Traceback (most recent call last):
File "main.py", line 16, in
encoded = jwt.encode({'iss': team_id,'iat': issued_timestamp,'exp': expiration_timestamp}, private_key, algorithm='ES256', headers={'kid': key_id})
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/jwt/api_jwt.py", line 66, in encode
json_payload, key, algorithm, headers, json_encoder
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/jwt/api_jws.py", line 114, in encode
key = alg_obj.prepare_key(key)
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/jwt/algorithms.py", line 351, in prepare_key
key = load_pem_private_key(key, password=None, backend=default_backend())
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/cryptography/hazmat/primitives/serialization.py", line 20, in load_pem_private_key
return backend.load_pem_private_key(data, password)
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1014, in load_pem_private_key
password,
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1233, in _load_key
self._handle_key_loading_error()
File "/Users/jordibruin/Downloads/Apple-JWT-Generator-master/env/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1291, in _handle_key_loading_error
raise ValueError("Could not deserialize key data.")
ValueError: Could not deserialize key data.
Do you have any suggestions on how to solve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.