diff --git a/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php index 31cab7afcd..201eab349d 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php @@ -100,7 +100,7 @@ class FormLoginAuthenticator extends AbstractLoginFormAuthenticator /** * @param Passport $passport */ - public function createAuthenticatedToken(PassportInterface $passport, $firewallName): TokenInterface + public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface { return new UsernamePasswordToken($passport->getUser(), null, $firewallName, $passport->getUser()->getRoles()); } diff --git a/src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php index e4c7af251e..7a70ddc9f3 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php @@ -47,7 +47,7 @@ class HttpBasicAuthenticator implements AuthenticatorInterface, AuthenticationEn $this->logger = $logger; } - public function start(Request $request, AuthenticationException $authException = null) + public function start(Request $request, AuthenticationException $authException = null): Response { $response = new Response(); $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', $this->realmName)); @@ -82,12 +82,12 @@ class HttpBasicAuthenticator implements AuthenticatorInterface, AuthenticationEn /** * @param Passport $passport */ - public function createAuthenticatedToken(PassportInterface $passport, $firewallName): TokenInterface + public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface { return new UsernamePasswordToken($passport->getUser(), null, $firewallName, $passport->getUser()->getRoles()); } - public function onAuthenticationSuccess(Request $request, TokenInterface $token, $firewallName): ?Response + public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response { return null; } diff --git a/src/Symfony/Component/Security/Http/Authenticator/Passport/SelfValidatingPassport.php b/src/Symfony/Component/Security/Http/Authenticator/Passport/SelfValidatingPassport.php index dd3ef6f962..597351a85f 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/Passport/SelfValidatingPassport.php +++ b/src/Symfony/Component/Security/Http/Authenticator/Passport/SelfValidatingPassport.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Http\Authenticator\Passport; use Symfony\Component\Security\Core\User\UserInterface; +use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; /** * An implementation used when there are no credentials to be checked (e.g. @@ -23,6 +24,9 @@ use Symfony\Component\Security\Core\User\UserInterface; */ class SelfValidatingPassport extends Passport { + /** + * @param BadgeInterface[] $badges + */ public function __construct(UserInterface $user, array $badges = []) { $this->user = $user;