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

TwoFactor/Trusted/JwtTokenEncoder::validationConstraints() may need an update #177

Closed
tybw opened this issue Feb 23, 2023 · 0 comments · Fixed by #178
Closed

TwoFactor/Trusted/JwtTokenEncoder::validationConstraints() may need an update #177

tybw opened this issue Feb 23, 2023 · 0 comments · Fixed by #178
Labels

Comments

@tybw
Copy link

tybw commented Feb 23, 2023

Bundle version: 6.x-dev
Symfony version: 6.2.0
PHP version: 8.1
Using authenticators (enable_authenticator_manager: true): NO

Description

The private method validationConstraints() in Scheb\TwoFactorBundle\Security\TwoFactor\Trusted uses Constraints\ValidAt() class under Lcobucci\JWT\Validation\Constraint. The latest 4.* version of lcobucci/jwt replaced ValidAt() with two similar classes: LooseValidAt and StrictValidAt. A reminder was found in the validationConstraints() method to change it when lcobucci/jwt is changed.

JwtTokenEncoder:

 private function validationConstraints(): iterable
    {
        yield new Constraint\SignedWith($this->configuration->signer(), $this->configuration->signingKey());
        yield new Constraint\ValidAt($this->clock); // replace with LooseValidAt once dependency on lcobucci/jwt is bumped up
        yield from $this->configuration->validationConstraints();
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant