0
Apple Music JWT 토큰을 생성하려고합니다.Apple Music JWT 토큰을 만들 수 없습니다.
유효한 keyId, teamId 및 .p8 파일이 있습니다. + 최신 버전의 pyjwt & 암호가 설치되어 있습니다.
python music_token.py
을 실행하려고 할 때 다음 오류가 발생합니다. 내가 잘못 여기서 뭔가를하고있는 중이 야 경우
(here에 대한 다운로드 music_token.py 스크립트)
Traceback (most recent call last):
File "music_token.py", line 33, in <module>
token = jwt.encode(payload, secret, algorithm=alg, headers=headers)
File "/Library/Python/2.7/site-packages/jwt/api_jwt.py", line 56, in encode
json_payload, key, algorithm, headers, json_encoder
File "/Library/Python/2.7/site-packages/jwt/api_jws.py", line 102, in encode
key = alg_obj.prepare_key(key)
File "/Library/Python/2.7/site-packages/jwt/algorithms.py", line 351, in prepare_key
key = load_pem_private_key(key, password=None, backend=default_backend())
File "/Library/Python/2.7/site-packages/cryptography/hazmat/primitives/serialization.py", line 20, in load_pem_private_key
return backend.load_pem_private_key(data, password)
File "/Library/Python/2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1015, in load_pem_private_key
password,
File "/Library/Python/2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1234, in _load_key
self._handle_key_loading_error()
File "/Library/Python/2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 1292, in _handle_key_loading_error
raise ValueError("Could not deserialize key data.")
ValueError: Could not deserialize key data.
은 누군가가 올바른 방향으로 날 지점시겠습니까?
구글 검색을 시도했는데 설치된 버전 jwt
에 문제가있을 수 있지만 최신 버전을 설치했음을 알았습니다.