summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Acl/Dbal/MutableAclProvider.php36
-rw-r--r--Acl/Domain/Acl.php20
-rw-r--r--Acl/Domain/AclCollectionCache.php2
-rw-r--r--Acl/Domain/UserSecurityIdentity.php2
-rw-r--r--Acl/Model/AclProviderInterface.php4
-rw-r--r--Acl/Model/AuditLoggerInterface.php2
-rw-r--r--Acl/Model/AuditableAclInterface.php4
-rw-r--r--Acl/Model/MutableAclInterface.php16
-rw-r--r--Core/Authentication/Token/AbstractToken.php11
-rw-r--r--Core/Authentication/Token/TokenInterface.php2
-rw-r--r--Core/Authentication/Token/UsernamePasswordToken.php2
-rw-r--r--Core/Encoder/BasePasswordEncoder.php2
-rw-r--r--Core/SecurityContext.php2
-rw-r--r--Http/Authorization/AccessDeniedHandlerInterface.php4
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php10
-rw-r--r--Http/Firewall/ContextListener.php4
-rw-r--r--Http/Firewall/LogoutListener.php6
-rw-r--r--Http/Firewall/RememberMeListener.php6
-rw-r--r--Http/RememberMe/TokenBasedRememberMeServices.php8
19 files changed, 76 insertions, 67 deletions
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php
index c0a33da..242c2a9 100644
--- a/Acl/Dbal/MutableAclProvider.php
+++ b/Acl/Dbal/MutableAclProvider.php
@@ -144,10 +144,10 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* This allows us to keep track of which values have been changed, so we don't
* have to do a full introspection when ->updateAcl() is called.
*
- * @param mixed $sender
+ * @param mixed $sender
* @param string $propertyName
- * @param mixed $oldValue
- * @param mixed $newValue
+ * @param mixed $oldValue
+ * @param mixed $newValue
* @return void
*/
public function propertyChanged($sender, $propertyName, $oldValue, $newValue)
@@ -398,16 +398,16 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
/**
* Constructs the SQL for inserting an ACE.
*
- * @param integer $classId
+ * @param integer $classId
* @param integer|null $objectIdentityId
- * @param string|null $field
- * @param integer $aceOrder
- * @param integer $securityIdentityId
- * @param string $strategy
- * @param integer $mask
- * @param Boolean $granting
- * @param Boolean $auditSuccess
- * @param Boolean $auditFailure
+ * @param string|null $field
+ * @param integer $aceOrder
+ * @param integer $securityIdentityId
+ * @param string $strategy
+ * @param integer $mask
+ * @param Boolean $granting
+ * @param Boolean $auditSuccess
+ * @param Boolean $auditFailure
* @return string
*/
protected function getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $aceOrder, $securityIdentityId, $strategy, $mask, $granting, $auditSuccess, $auditFailure)
@@ -479,7 +479,7 @@ QUERY;
/**
* Constructs the SQL for inserting an object identity.
*
- * @param string $identifier
+ * @param string $identifier
* @param integer $classId
* @param Boolean $entriesInheriting
* @return string
@@ -532,7 +532,7 @@ QUERY;
*
* @param integer $classId
* @param integer $oid
- * @param string $field
+ * @param string $field
* @param integer $order
* @return string
*/
@@ -599,7 +599,7 @@ QUERY;
* Constructs the SQL for updating an object identity.
*
* @param integer $pk
- * @param array $changes
+ * @param array $changes
* @throws \InvalidArgumentException
* @return string
*/
@@ -621,7 +621,7 @@ QUERY;
* Constructs the SQL for updating an ACE.
*
* @param integer $pk
- * @param array $sets
+ * @param array $sets
* @throws \InvalidArgumentException
* @return string
*/
@@ -748,7 +748,7 @@ QUERY;
* This processes changes on an ACE related property (classFieldAces, or objectFieldAces).
*
* @param string $name
- * @param array $changes
+ * @param array $changes
* @return void
*/
private function updateFieldAceProperty($name, array $changes)
@@ -805,7 +805,7 @@ QUERY;
* This processes changes on an ACE related property (classAces, or objectAces).
*
* @param string $name
- * @param array $changes
+ * @param array $changes
* @return void
*/
private function updateAceProperty($name, array $changes)
diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php
index bb088f8..c77dab1 100644
--- a/Acl/Domain/Acl.php
+++ b/Acl/Domain/Acl.php
@@ -401,7 +401,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
/**
* Deletes an ACE
*
- * @param string $property
+ * @param string $property
* @param integer $index
* @throws \OutOfBoundsException
* @return void
@@ -426,9 +426,9 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
/**
* Deletes a field-based ACE
*
- * @param string $property
+ * @param string $property
* @param integer $index
- * @param string $field
+ * @param string $field
* @throws \OutOfBoundsException
* @return void
*/
@@ -559,10 +559,10 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
/**
* Updates an ACE
*
- * @param string $property
+ * @param string $property
* @param integer $index
* @param integer $mask
- * @param string $strategy
+ * @param string $strategy
* @throws \OutOfBoundsException
* @return void
*/
@@ -614,11 +614,11 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
/**
* Updates a field-based ACE
*
- * @param string $property
+ * @param string $property
* @param integer $index
- * @param string $field
+ * @param string $field
* @param integer $mask
- * @param string $strategy
+ * @param string $strategy
* @throws \InvalidArgumentException
* @throws \OutOfBoundsException
* @return void
@@ -649,8 +649,8 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* Called when a property of the ACL changes
*
* @param string $name
- * @param mixed $oldValue
- * @param mixed $newValue
+ * @param mixed $oldValue
+ * @param mixed $newValue
* @return void
*/
private function onPropertyChanged($name, $oldValue, $newValue)
diff --git a/Acl/Domain/AclCollectionCache.php b/Acl/Domain/AclCollectionCache.php
index c4f5fdd..12d7053 100644
--- a/Acl/Domain/AclCollectionCache.php
+++ b/Acl/Domain/AclCollectionCache.php
@@ -46,7 +46,7 @@ class AclCollectionCache
* of required queries considerably.
*
* @param mixed $collection anything that can be passed to foreach()
- * @param array $tokens an array of TokenInterface implementations
+ * @param array $tokens an array of TokenInterface implementations
* @return void
*/
public function cache($collection, array $tokens = array())
diff --git a/Acl/Domain/UserSecurityIdentity.php b/Acl/Domain/UserSecurityIdentity.php
index df2be38..e9ff0a2 100644
--- a/Acl/Domain/UserSecurityIdentity.php
+++ b/Acl/Domain/UserSecurityIdentity.php
@@ -29,7 +29,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
* Constructor
*
* @param string $username the username representation
- * @param string $class the user's fully qualified class name
+ * @param string $class the user's fully qualified class name
*/
public function __construct($username, $class)
{
diff --git a/Acl/Model/AclProviderInterface.php b/Acl/Model/AclProviderInterface.php
index 12f55e0..2f878e1 100644
--- a/Acl/Model/AclProviderInterface.php
+++ b/Acl/Model/AclProviderInterface.php
@@ -22,7 +22,7 @@ interface AclProviderInterface
* Retrieves all child object identities from the database
*
* @param ObjectIdentityInterface $parentOid
- * @param Boolean $directChildrenOnly
+ * @param Boolean $directChildrenOnly
* @return array returns an array of child 'ObjectIdentity's
*/
function findChildren(ObjectIdentityInterface $parentOid, $directChildrenOnly = false);
@@ -32,7 +32,7 @@ interface AclProviderInterface
*
* @throws AclNotFoundException when there is no ACL
* @param ObjectIdentityInterface $oid
- * @param array $sids
+ * @param array $sids
* @return AclInterface
*/
function findAcl(ObjectIdentityInterface $oid, array $sids = array());
diff --git a/Acl/Model/AuditLoggerInterface.php b/Acl/Model/AuditLoggerInterface.php
index dceb76b..f4a83b3 100644
--- a/Acl/Model/AuditLoggerInterface.php
+++ b/Acl/Model/AuditLoggerInterface.php
@@ -22,7 +22,7 @@ interface AuditLoggerInterface
* This method is called whenever access is granted, or denied, and
* administrative mode is turned off.
*
- * @param Boolean $granted
+ * @param Boolean $granted
* @param EntryInterface $ace
* @return void
*/
diff --git a/Acl/Model/AuditableAclInterface.php b/Acl/Model/AuditableAclInterface.php
index 2a6d619..8f473ff 100644
--- a/Acl/Model/AuditableAclInterface.php
+++ b/Acl/Model/AuditableAclInterface.php
@@ -32,7 +32,7 @@ interface AuditableAclInterface extends MutableAclInterface
* Updates auditing for class-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @param Boolean $auditSuccess
* @param Boolean $auditFailure
* @return void
@@ -54,7 +54,7 @@ interface AuditableAclInterface extends MutableAclInterface
* Updates auditing for object-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @param Boolean $auditSuccess
* @param Boolean $auditFailure
* @return void
diff --git a/Acl/Model/MutableAclInterface.php b/Acl/Model/MutableAclInterface.php
index 54a3f8e..b83c106 100644
--- a/Acl/Model/MutableAclInterface.php
+++ b/Acl/Model/MutableAclInterface.php
@@ -33,7 +33,7 @@ interface MutableAclInterface extends AclInterface
* Deletes a class-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @return void
*/
function deleteClassFieldAce($index, $field);
@@ -50,7 +50,7 @@ interface MutableAclInterface extends AclInterface
* Deletes an object-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @return void
*/
function deleteObjectFieldAce($index, $field);
@@ -133,7 +133,7 @@ interface MutableAclInterface extends AclInterface
*
* @param integer $index
* @param integer $mask
- * @param string $strategy if null the strategy should not be changed
+ * @param string $strategy if null the strategy should not be changed
* @return void
*/
function updateClassAce($index, $mask, $strategy = null);
@@ -142,9 +142,9 @@ interface MutableAclInterface extends AclInterface
* Updates a class-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @param integer $mask
- * @param string $strategy if null the strategy should not be changed
+ * @param string $strategy if null the strategy should not be changed
* @return void
*/
function updateClassFieldAce($index, $field, $mask, $strategy = null);
@@ -154,7 +154,7 @@ interface MutableAclInterface extends AclInterface
*
* @param integer $index
* @param integer $mask
- * @param string $strategy if null the strategy should not be changed
+ * @param string $strategy if null the strategy should not be changed
* @return void
*/
function updateObjectAce($index, $mask, $strategy = null);
@@ -163,9 +163,9 @@ interface MutableAclInterface extends AclInterface
* Updates an object-field-based ACE
*
* @param integer $index
- * @param string $field
+ * @param string $field
* @param integer $mask
- * @param string $strategy if null the strategy should not be changed
+ * @param string $strategy if null the strategy should not be changed
* @return void
*/
function updateObjectFieldAce($index, $field, $mask, $strategy = null);
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index dc21684..8e008e5 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -75,6 +75,15 @@ abstract class AbstractToken implements TokenInterface
return $this->user;
}
+ /**
+ * Sets the user in the token.
+ *
+ * The user can be a UserInterface instance, or an object implementing
+ * a __toString method or the username as a regular string.
+ *
+ * @param mixed $user The user
+ * @throws \InvalidArgumentException
+ */
public function setUser($user)
{
if (!($user instanceof UserInterface || (is_object($user) && method_exists($user, '__toString')) || is_string($user))) {
@@ -167,7 +176,7 @@ abstract class AbstractToken implements TokenInterface
/**
* Returns true if the attribute exists.
*
- * @param string $name The attribute name
+ * @param string $name The attribute name
*
* @return Boolean true if the attribute exists, false otherwise
*/
diff --git a/Core/Authentication/Token/TokenInterface.php b/Core/Authentication/Token/TokenInterface.php
index ceacf92..3dafccc 100644
--- a/Core/Authentication/Token/TokenInterface.php
+++ b/Core/Authentication/Token/TokenInterface.php
@@ -100,7 +100,7 @@ interface TokenInterface extends \Serializable
/**
* Returns true if the attribute exists.
*
- * @param string $name The attribute name
+ * @param string $name The attribute name
*
* @return Boolean true if the attribute exists, false otherwise
*/
diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php
index 6c6ed5b..95eec54 100644
--- a/Core/Authentication/Token/UsernamePasswordToken.php
+++ b/Core/Authentication/Token/UsernamePasswordToken.php
@@ -24,7 +24,7 @@ class UsernamePasswordToken extends AbstractToken
/**
* Constructor.
*
- * @param string $user The username (like a nickname, email address, etc.)
+ * @param string $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method.
* @param string $credentials This usually is the password of the user
* @param string $providerKey The provider key
* @param array $roles An array of roles
diff --git a/Core/Encoder/BasePasswordEncoder.php b/Core/Encoder/BasePasswordEncoder.php
index 58c64db..ae1c7d4 100644
--- a/Core/Encoder/BasePasswordEncoder.php
+++ b/Core/Encoder/BasePasswordEncoder.php
@@ -47,7 +47,7 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface
* Merges a password and a salt.
*
* @param string $password the password to be used
- * @param string $salt the salt to be used
+ * @param string $salt the salt to be used
*
* @return string a merged password and salt
*/
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php
index 0623140..bc6493b 100644
--- a/Core/SecurityContext.php
+++ b/Core/SecurityContext.php
@@ -50,7 +50,7 @@ class SecurityContext implements SecurityContextInterface
*
* @throws AuthenticationCredentialsNotFoundException when the security context has no authentication token.
*
- * @param mixed $attributes
+ * @param mixed $attributes
* @param mixed|null $object
*
* @return Boolean
diff --git a/Http/Authorization/AccessDeniedHandlerInterface.php b/Http/Authorization/AccessDeniedHandlerInterface.php
index 798e611..2409c50 100644
--- a/Http/Authorization/AccessDeniedHandlerInterface.php
+++ b/Http/Authorization/AccessDeniedHandlerInterface.php
@@ -25,8 +25,8 @@ interface AccessDeniedHandlerInterface
/**
* Handles an access denied failure.
*
- * @param Request $request
- * @param AccessDeniedException $accessDeniedException
+ * @param Request $request
+ * @param AccessDeniedException $accessDeniedException
*
* @return Response may return null
*/
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 1765f7f..9452e29 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -72,10 +72,10 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
* @param string $providerKey
* @param array $options An array of options for the processing of a
* successful, or failed authentication attempt
- * @param AuthenticationSuccessHandlerInterface $successHandler
- * @param AuthenticationFailureHandlerInterface $failureHandler
- * @param LoggerInterface $logger A LoggerInterface instance
- * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
+ * @param AuthenticationSuccessHandlerInterface $successHandler
+ * @param AuthenticationFailureHandlerInterface $failureHandler
+ * @param LoggerInterface $logger A LoggerInterface instance
+ * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
*/
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, array $options = array(), AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
{
@@ -175,7 +175,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
/**
* Performs authentication.
*
- * @param Request $request A Request instance
+ * @param Request $request A Request instance
*
* @return TokenInterface The authenticated token, or null if full authentication is not possible
*
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index d282452..52dea56 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
-use Symfony\Component\Security\Core\SecurityContext;
+use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -37,7 +37,7 @@ class ContextListener implements ListenerInterface
private $logger;
private $userProviders;
- public function __construct(SecurityContext $context, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
+ public function __construct(SecurityContextInterface $context, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
{
if (empty($contextKey)) {
throw new \InvalidArgumentException('$contextKey must not be empty.');
diff --git a/Http/Firewall/LogoutListener.php b/Http/Firewall/LogoutListener.php
index 4bfa7e1..07244f5 100644
--- a/Http/Firewall/LogoutListener.php
+++ b/Http/Firewall/LogoutListener.php
@@ -37,9 +37,9 @@ class LogoutListener implements ListenerInterface
* Constructor
*
* @param SecurityContextInterface $securityContext
- * @param HttpUtils $httpUtils An HttpUtilsInterface instance
- * @param string $logoutPath The path that starts the logout process
- * @param string $targetUrl The URL to redirect to after logout
+ * @param HttpUtils $httpUtils An HttpUtilsInterface instance
+ * @param string $logoutPath The path that starts the logout process
+ * @param string $targetUrl The URL to redirect to after logout
* @param LogoutSuccessHandlerInterface $successHandler
*/
public function __construct(SecurityContextInterface $securityContext, HttpUtils $httpUtils, $logoutPath, $targetUrl = '/', LogoutSuccessHandlerInterface $successHandler = null)
diff --git a/Http/Firewall/RememberMeListener.php b/Http/Firewall/RememberMeListener.php
index 5531012..ccda113 100644
--- a/Http/Firewall/RememberMeListener.php
+++ b/Http/Firewall/RememberMeListener.php
@@ -6,7 +6,7 @@ use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
-use Symfony\Component\Security\Core\SecurityContext;
+use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Http\SecurityEvents;
@@ -37,13 +37,13 @@ class RememberMeListener implements ListenerInterface
/**
* Constructor
*
- * @param SecurityContext $securityContext
+ * @param SecurityContextInterface $securityContext
* @param RememberMeServicesInterface $rememberMeServices
* @param AuthenticationManagerInterface $authenticationManager
* @param LoggerInterface $logger
* @param EventDispatcherInterface $dispatcher
*/
- public function __construct(SecurityContext $securityContext, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
+ public function __construct(SecurityContextInterface $securityContext, RememberMeServicesInterface $rememberMeServices, AuthenticationManagerInterface $authenticationManager, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
{
$this->securityContext = $securityContext;
$this->rememberMeServices = $rememberMeServices;
diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php
index 44140f7..aa76228 100644
--- a/Http/RememberMe/TokenBasedRememberMeServices.php
+++ b/Http/RememberMe/TokenBasedRememberMeServices.php
@@ -136,10 +136,10 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
/**
* Generates a hash for the cookie to ensure it is not being tempered with
*
- * @param string $class
- * @param string $username The username
- * @param integer $expires The unixtime when the cookie expires
- * @param string $password The encoded password
+ * @param string $class
+ * @param string $username The username
+ * @param integer $expires The unixtime when the cookie expires
+ * @param string $password The encoded password
*
* @throws \RuntimeException when the private key is empty
*