1: <?php
2:
3: namespace Mapbender\DrupalIntegrationBundle\Security\Authentication\Token;
4:
5: use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
6:
7:
8: class DrupalUserToken extends AbstractToken
9: {
10: public function __construct($drupalUser)
11: {
12: parent::__construct($drupalUser->getRoles());
13:
14: $authenticated = $drupalUser->getId() !== 0;
15: $this->setAuthenticated($authenticated);
16: $this->setUser($drupalUser);
17: }
18:
19: public function getCredentials()
20: {
21: return '';
22: }
23: }
24: