Skip to content
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

Apple - Broken since 5.5.0 #1015

Closed
golsson opened this issue May 3, 2023 · 4 comments · Fixed by #1018
Closed

Apple - Broken since 5.5.0 #1015

golsson opened this issue May 3, 2023 · 4 comments · Fixed by #1018

Comments

@golsson
Copy link
Contributor

golsson commented May 3, 2023

lcobucci/jwt has removed a number of functions:

  • Lcobucci\JWT\Configuration::forUnsecuredSigner()
  • Lcobucci\JWT\Signer\Key\InMemory::empty()
  • Lcobucci\JWT\Signer\None
  • Lcobucci\JWT\Token\Signature::fromEmptyData()

See https://lcobucci-jwt.readthedocs.io/en/stable/upgrading/#removal-of-none-algorithm - however 5.5.0 still makes use of Lcobucci\JWT\Configuration::forUnsecuredSigner() here

$jwtContainer = Configuration::forUnsecuredSigner();
which breaks the functionality of this package after upgrade to lcobucci/jwt 5.0

@hamrak @atymic

@atymic
Copy link
Member

atymic commented May 3, 2023

Can you PR a fix? Otherwise I will revert the previous PR

@hamrak
Copy link
Contributor

hamrak commented May 3, 2023

Please check my pull request with bugfix, for me it works.

Lcobucci\JWT\Configuration::forUnsecuredSigner() - Fixed using Configuration::forSymmetricSigner()
Lcobucci\JWT\Signer\Key\InMemory::empty() - Replaced with InMemory::plainText('')
Lcobucci\JWT\Signer\None - Used own Signer - AppleSignerNone
Lcobucci\JWT\Token\Signature::fromEmptyData() - Not used, but can be replaced with new Signature('', '');

And bonus, I added the option to enter a certificate instead of a secret key. (In separate PR)

@atymic
Copy link
Member

atymic commented May 3, 2023

@hamrak can you please split this into two PRs? Bugfix for issue first please and then you can do the other changes. In the meantime i have reverted.

@hamrak
Copy link
Contributor

hamrak commented May 4, 2023

Done. Can someone check #1018 and #1019 if it works for you too? It works for me, I tested it, but sometimes ... Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants