summaryrefslogtreecommitdiffstats
path: root/Authentication/Token/UsernamePasswordToken.php
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-01-25 20:28:26 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-01-26 16:38:54 +0100
commit521c9f65e9d70618f63ac6ed803a495651b9fd35 (patch)
tree4e64bf3f877a4050eb3eb95c0b55630a4105053c /Authentication/Token/UsernamePasswordToken.php
parentbff922f5c7ab61fb144e124b584da067842cb955 (diff)
downloadsymfony-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.php13
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}
*/