diff --git a/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php b/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php index a4ead01d14cd2..1e3752d0f25f7 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php +++ b/src/Symfony/Component/Security/Http/Authenticator/Passport/Passport.php @@ -28,9 +28,11 @@ class Passport implements UserPassportInterface protected $user; + private $attributes = []; + /** * @param CredentialsInterface $credentials the credentials to check for this authentication, use - * SelfValidatingPassport if no credentials should be checked. + * SelfValidatingPassport if no credentials should be checked * @param BadgeInterface[] $badges */ public function __construct(UserInterface $user, CredentialsInterface $credentials, array $badges = []) @@ -47,4 +49,22 @@ public function getUser(): UserInterface { return $this->user; } + + /** + * @param mixed $value + */ + public function setAttribute(string $name, $value): void + { + $this->attributes[$name] = $value; + } + + /** + * @param mixed $default + * + * @return mixed + */ + public function getAttribute(string $name, $default = null) + { + return $this->attributes[$name] ?? $default; + } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: