for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Happyr\ApiBundle\Security\Authentication\Provider;
use Happyr\ApiBundle\Security\Authentication\Token\WsseUserToken;
use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
/**
* Debug provider is always open. No security here.
*
* @author Tobias Nyholm <[email protected]>
*/
class DebugProvider implements AuthenticationProviderInterface
{
* @var array
private $debugRoles;
* @param array $debugRoles
* @return DebugProvider
public function setDebugRoles($debugRoles)
$this->debugRoles = $debugRoles;
return $this;
}
* {@inheritdoc}
public function authenticate(TokenInterface $token)
$authenticatedToken = new WsseUserToken($this->debugRoles);
return $authenticatedToken;
public function supports(TokenInterface $token)
return true;