CupertinoJWT | Parse Apple 's .p8 private key file | Authentication library
kandi X-RAY | CupertinoJWT Summary
kandi X-RAY | CupertinoJWT Summary
Parse Apple's .p8 private key file and sign JWT with ES256, without third-party dependencies. Supports Apple's server-side APIs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CupertinoJWT
CupertinoJWT Key Features
CupertinoJWT Examples and Code Snippets
Community Discussions
Trending Discussions on CupertinoJWT
QUESTION
i want to create a JWT in a scala application for talking to the Apple's AppStore Connect api. i'm following the guide here
i'm getting an invalid signature on jwt.io when creating a JWT with the below code. a request to appstore connect results in a 401
i can verify that the JWT encodes the header and payload correctly on http://jwt.io
looking at this library, i think i'm selecting the correct curve algorithm:
After creating the token, one must sign it with an Apple-provided private key, using the Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve and the SHA-256 hash algorithm, or ES256.
i'm not sure what is wrong - maybe i'm not generating the S
value correctly?
ANSWER
Answered 2021-May-28 at 12:23I can suggest two things to try out:
JwtBuilder signWith(SignatureAlgorithm var1, Key var2)
is deprecated. Can you try usingJwtBuilder signWith(Key var1, SignatureAlgorithm var2)
, and see if that succeeds?- If not, you can try using bountycastle , which does work for me. Following is the code snippet for getting the private key.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CupertinoJWT
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page