diff options
Diffstat (limited to 'Authentication/Token/UsernamePasswordToken.php')
-rw-r--r-- | Authentication/Token/UsernamePasswordToken.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Authentication/Token/UsernamePasswordToken.php b/Authentication/Token/UsernamePasswordToken.php index ed82ec8..1794481 100644 --- a/Authentication/Token/UsernamePasswordToken.php +++ b/Authentication/Token/UsernamePasswordToken.php @@ -18,19 +18,30 @@ namespace Symfony\Component\Security\Authentication\Token; */ class UsernamePasswordToken extends Token { + protected $providerKey; + /** * Constructor. + * + * @param string $user The username (like a nickname, email address, etc.) + * @param string $credentials This usually is the password of the user */ - public function __construct($user, $credentials, array $roles = array()) + public function __construct($user, $credentials, $providerKey, array $roles = array()) { parent::__construct($roles); $this->setUser($user); $this->credentials = $credentials; + $this->providerKey = $providerKey; parent::setAuthenticated((Boolean) count($roles)); } + public function getProviderKey() + { + return $this->providerKey; + } + /** * {@inheritdoc} */ |