-
-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use json privatekey #235
Comments
@lovearthhome you're trying to use a JWK, which currently not supported #32. So for now, if you want to use this lib, you'd need to convert the JWK into private/public keys. There're other libraries that support it. |
Hi, No need for another library, you can use that application (PHAR format). # Download the application
curl -OL https://github.com/web-token/jwt-app/raw/gh-pages/jose.phar
curl -OL https://github.com/web-token/jwt-app/raw/gh-pages/jose.phar.pubkey
# Convert your key
php jose.phar key:convert:pkcs1 '<YOUR JWK HERE>' > your.key |
For that you will need Line 32 in 2c2c77f
|
@Ocramius |
@lovearthhome no need to move anything |
is this right? |
Yeap, that should be it 👍 |
Error happens on:
|
Hmm... @lcobucci do yo remember which version of Btw, we should probably get rid of the optional dependency, even if it removes |
Hi @lovearthhome, As explained in the issue to opened (see web-token/jwt-framework#122), the problem is that you are using an RSA key with an EC algorithm
If you want to use your RSA key, then you have to use a RSA based algorithm (RSxxx or PSxxx). |
Reviewed |
#288 just backported PHP 7.1-7.3 support, can you please change your requirements to |
Stable |
my private key is in such a format, which cannot tobe read by keychain->getPriateKey(*)
how to deal with this private key
{"kty":"RSA","kid":"88483727556929xxxxxxxx9904351185815489","alg":"ES256","n":"ie0IKvKLd7Y3izHcZemdDsVVXg5QtWtGF7XEkILnn66R2\_3a30DikqV409OVL7Hv0ElACgCaBLEgZeGHTcdLE1xxDTna8MMBnBNuMVghvFERCKh8uzpxlQsfcnFd5IFdJWj1x5Tscetrow6lA3h5zYx0rF5TkZzC4DclxgDmITRam0dsHBxr3uk9m9YYBz2mX0ehjY0xxxxlaA4P9OFAO4au9-zcVQop9vLirxdwDedk2p-F9GP6UiQC9V2LTWqkVw\_oPBf9Rlh8Qdi19jA8SeCfzAxJZYlbOTK8dYAFAVEFsvXCFvdaxQefwWFw","e":"AQAB"}
The text was updated successfully, but these errors were encountered: