Skip to content

Commit

Permalink
Update custom_conditions.rst for Symfony 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
markocupic authored and scheb committed Mar 20, 2024
1 parent 8ea7940 commit 1469e57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/custom_conditions.rst
Expand Up @@ -34,7 +34,7 @@ Bypassing Two-Factor Authentication
If you simply wish to bypass 2fa for a specific authenticator, setting the
``TwoFactorAuthenticator::FLAG_2FA_COMPLETE`` attribute on the security token will achieve this.

For example, if you are building a `custom Authenticator <https://symfony.com/doc/5.4/security/experimental_authenticators.html#creating-a-custom-authenticator>`_
For example, if you are building a `custom Authenticator <https://symfony.com/doc/current/security/custom_authenticator.html>`_
this would bypass 2fa when the authenticator is used:

.. code-block:: php
Expand All @@ -46,11 +46,11 @@ this would bypass 2fa when the authenticator is used:
use Scheb\TwoFactorBundle\Security\Http\Authenticator\TwoFactorAuthenticator;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
class MyAuthenticator extends AbstractAuthenticator
{
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
public function createToken(Passport $passport, string $firewallName): TokenInterface
{
$token = parent::createAuthenticatedToken($passport, $firewallName);
Expand Down

0 comments on commit 1469e57

Please sign in to comment.