Skip to content

Commit d28be61

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Replace deprecated `PassportInterface` occurrences by `Passport`
2 parents 386ba59 + 554fc79 commit d28be61

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
@@ -284,7 +284,7 @@ method that fits most use-cases::
284284
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
285285
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
286286
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
287-
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
287+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
288288
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
289289

290290
class ApiKeyAuthenticator extends AbstractAuthenticator
@@ -299,7 +299,7 @@ method that fits most use-cases::
299299
return $request->headers->has('X-AUTH-TOKEN');
300300
}
301301

302-
public function authenticate(Request $request): PassportInterface
302+
public function authenticate(Request $request): Passport
303303
{
304304
$apiToken = $request->headers->get('X-AUTH-TOKEN');
305305
if (null === $apiToken) {
@@ -453,7 +453,7 @@ using :ref:`the user provider <security-user-providers>`::
453453
$this->userRepository = $userRepository;
454454
}
455455

456-
public function authenticate(Request $request): PassportInterface
456+
public function authenticate(Request $request): Passport
457457
{
458458
// ...
459459

@@ -549,11 +549,11 @@ would initialize the passport like this::
549549
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge;
550550
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
551551
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
552-
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
552+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
553553

554554
class LoginAuthenticator extends AbstractAuthenticator
555555
{
556-
public function authenticate(Request $request): PassportInterface
556+
public function authenticate(Request $request): Passport
557557
{
558558
$password = $request->request->get('password');
559559
$username = $request->request->get('username');
@@ -583,7 +583,7 @@ would initialize the passport like this::
583583
{
584584
// ...
585585

586-
public function authenticate(Request $request): PassportInterface
586+
public function authenticate(Request $request): Passport
587587
{
588588
// ... process the request
589589

@@ -595,7 +595,7 @@ would initialize the passport like this::
595595
return $passport;
596596
}
597597

598-
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
598+
public function createToken(Passport $passport, string $firewallName): TokenInterface
599599
{
600600
// read the attribute value
601601
return new CustomOauthToken($passport->getUser(), $passport->getAttribute('scope'));

0 commit comments

Comments
 (0)