diff options
author | Johannes Schmitt <schmittjoh@gmail.com> | 2011-01-25 20:28:26 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2011-01-26 16:38:54 +0100 |
commit | 521c9f65e9d70618f63ac6ed803a495651b9fd35 (patch) | |
tree | 4e64bf3f877a4050eb3eb95c0b55630a4105053c /Authentication/Token/UsernamePasswordToken.php | |
parent | bff922f5c7ab61fb144e124b584da067842cb955 (diff) | |
download | symfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.zip symfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.tar.gz symfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.tar.bz2 |
[Security] many improvements, and fixes
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} */ |