Skip to content

Commit 2d3a0b2

Browse files
committed
Replace deprecated PassportInterface occurrences by Passport
1 parent 4c6b780 commit 2d3a0b2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

security/authenticator_manager.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ method that fits most use-cases::
300300
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
301301
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
302302
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
303-
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
303+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
304304
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
305305

306306
class ApiKeyAuthenticator extends AbstractAuthenticator
@@ -315,7 +315,7 @@ method that fits most use-cases::
315315
return $request->headers->has('X-AUTH-TOKEN');
316316
}
317317

318-
public function authenticate(Request $request): PassportInterface
318+
public function authenticate(Request $request): Passport
319319
{
320320
$apiToken = $request->headers->get('X-AUTH-TOKEN');
321321
if (null === $apiToken) {
@@ -474,7 +474,7 @@ using :ref:`the user provider <security-user-providers>`::
474474
$this->userRepository = $userRepository;
475475
}
476476

477-
public function authenticate(Request $request): PassportInterface
477+
public function authenticate(Request $request): Passport
478478
{
479479
// ...
480480

@@ -570,11 +570,11 @@ would initialize the passport like this::
570570
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge;
571571
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
572572
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
573-
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
573+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
574574

575575
class LoginAuthenticator extends AbstractAuthenticator
576576
{
577-
public function authenticate(Request $request): PassportInterface
577+
public function authenticate(Request $request): Passport
578578
{
579579
$password = $request->request->get('password');
580580
$username = $request->request->get('username');
@@ -604,7 +604,7 @@ would initialize the passport like this::
604604
{
605605
// ...
606606

607-
public function authenticate(Request $request): PassportInterface
607+
public function authenticate(Request $request): Passport
608608
{
609609
// ... process the request
610610

@@ -616,7 +616,7 @@ would initialize the passport like this::
616616
return $passport;
617617
}
618618

619-
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
619+
public function createAuthenticatedToken(Passport $passport, string $firewallName): TokenInterface
620620
{
621621
// read the attribute value
622622
return new CustomOauthToken($passport->getUser(), $passport->getAttribute('scope'));

0 commit comments

Comments
 (0)