web-token / jwt-doc

Documentation for the JWT Framework
MIT License
12 stars 19 forks source link

Migration documentation assumes Symfony configuration #13

Closed mpwaldhorst closed 8 months ago

mpwaldhorst commented 5 years ago

As far as I can see in the migration documentation with regards to the usage of JKUFactory the assumption is made that one uses Symfony.

https://web-token.spomky-labs.com/migration/from-spomky-labs-jose/key-sets-jwkset#jkufactory-x-5-ufactory

There does not seem to be any information on how to use these classes in non Symfony projects.

It would be great if more information on this can be provided.

Spomky commented 5 years ago

That’s right. This section of the doc should be updated. To use the JKUFactory, you need:

When done, you can create an instance of the JKUFactory class (first argument should be null with v1.3.5+). Then you can retrieve the JWKSet using the method loadFromUrl.

I will take time to update the doc. Let me know if you need anything else.

taghreedalshammari commented 3 years ago

Hello, Any updates regarding this? Is there an implemented example?

after getting the jwkset from the URL, how will be the verification done?

in old version we use

$jws = $loader->loadAndVerifySignatureUsingKeySet(
$input,
$jwk,
['RS256'],
$signature_index
);