Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b001801

Browse filesBrowse files
committed
[Security] Deprecate PassportInterface
1 parent d642f76 commit b001801
Copy full SHA for b001801

File tree

6 files changed

+13
-4
lines changed
Filter options

6 files changed

+13
-4
lines changed

‎src/Symfony/Component/Ldap/Security/LdapAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Ldap/Security/LdapAuthenticator.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1717
use Symfony\Component\Security\Core\Exception\AuthenticationException;
1818
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
19+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
1920
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
2021

2122
/**
@@ -53,7 +54,7 @@ public function supports(Request $request): ?bool
5354
return $this->authenticator->supports($request);
5455
}
5556

56-
public function authenticate(Request $request): PassportInterface
57+
public function authenticate(Request $request): Passport
5758
{
5859
$passport = $this->authenticator->authenticate($request);
5960
$passport->addBadge(new LdapBadge($this->ldapServiceId, $this->dnString, $this->searchDn, $this->searchPassword, $this->queryString));

‎src/Symfony/Component/Security/Http/Authenticator/AuthenticatorInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/AuthenticatorInterface.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\HttpFoundation\Response;
1616
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1717
use Symfony\Component\Security\Core\Exception\AuthenticationException;
18+
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
1819
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
1920

2021
/**
@@ -47,8 +48,10 @@ public function supports(Request $request): ?bool;
4748
* a UserNotFoundException when the user cannot be found).
4849
*
4950
* @throws AuthenticationException
51+
*
52+
* @return Passport
5053
*/
51-
public function authenticate(Request $request): PassportInterface;
54+
public function authenticate(Request $request);/*: Passport;*/
5255

5356
/**
5457
* Create an authenticated token for the given user.
@@ -59,7 +62,7 @@ public function authenticate(Request $request): PassportInterface;
5962
*
6063
* @see AbstractAuthenticator
6164
*
62-
* @param PassportInterface $passport The passport returned from authenticate()
65+
* @param Passport $passport The passport returned from authenticate()
6366
*/
6467
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface;
6568

‎src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function supports(Request $request): bool
7777
&& $this->httpUtils->checkRequestPath($request, $this->options['check_path']);
7878
}
7979

80-
public function authenticate(Request $request): PassportInterface
80+
public function authenticate(Request $request): Passport
8181
{
8282
$credentials = $this->getCredentials($request);
8383

‎src/Symfony/Component/Security/Http/Authenticator/Passport/PassportInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/Passport/PassportInterface.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* passport.
2222
*
2323
* @author Wouter de Jong <wouter@wouterj.nl>
24+
*
25+
* @deprecated since Symfony 5.4, use {@link Passport} instead
2426
*/
2527
interface PassportInterface
2628
{

‎src/Symfony/Component/Security/Http/Authenticator/Passport/UserPassportInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/Passport/UserPassportInterface.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* Represents a passport for a Security User.
1919
*
2020
* @author Wouter de Jong <wouter@wouterj.nl>
21+
*
22+
* @deprecated since Symfony 5.4, use {@link Passport} instead
2123
*/
2224
interface UserPassportInterface extends PassportInterface
2325
{

‎src/Symfony/Component/Security/Http/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Deprecate not setting the 5th argument (`$exceptionOnNoToken`) of `AccessListener` to `false`
88
* Deprecate `DeauthenticatedEvent`, use `TokenDeauthenticatedEvent` instead
9+
* Deprecate `PassportInterface`, use `Passport` instead
910

1011
5.3
1112
---

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.