Skip to content

Commit 63b7af6

Browse files
committed
minor #16990 [Security] Update custom_authenticator (mohamedGasmii)
This PR was merged into the 6.0 branch. Discussion ---------- [Security] Update custom_authenticator Adjust authenticate() return type & createToken $passport typehint to be like the definition in AuthenticatorInterface <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 4f152cd [Security] Update custom_authenticator
2 parents b3d61c8 + 4f152cd commit 63b7af6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/custom_authenticator.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ authenticator methods (e.g. ``createToken()``)::
355355
{
356356
// ...
357357

358-
public function authenticate(Request $request): PassportInterface
358+
public function authenticate(Request $request): Passport
359359
{
360360
// ... process the request
361361

@@ -367,7 +367,7 @@ authenticator methods (e.g. ``createToken()``)::
367367
return $passport;
368368
}
369369

370-
public function createToken(PassportInterface $passport, string $firewallName): TokenInterface
370+
public function createToken(Passport $passport, string $firewallName): TokenInterface
371371
{
372372
// read the attribute value
373373
return new CustomOauthToken($passport->getUser(), $passport->getAttribute('scope'));

0 commit comments

Comments
 (0)