1 | <?php |
||
18 | class TokenManager implements TokenManagerInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var TokenFactoryInterface |
||
22 | */ |
||
23 | private $factory; |
||
24 | |||
25 | /** |
||
26 | * @var TokenRepositoryInterface |
||
27 | */ |
||
28 | private $repository; |
||
29 | |||
30 | /** |
||
31 | * @var InformationGuesserInterface |
||
32 | */ |
||
33 | private $informationGuesser; |
||
34 | |||
35 | /** |
||
36 | * @var UserManagerInterface |
||
37 | */ |
||
38 | private $userManager; |
||
39 | |||
40 | /** |
||
41 | * @var EventDispatcher |
||
42 | */ |
||
43 | private $eventDispatcher; |
||
44 | |||
45 | /** |
||
46 | * @param TokenFactoryInterface $factory The token factory |
||
47 | * @param TokenRepositoryInterface $repository The token repository |
||
48 | * @param InformationGuesserInterface $informationGuesser The information guesser |
||
49 | * @param UserManagerInterface $userManager The user manager |
||
50 | * @param EventDispatcher $eventDispatcher The event dispatcher |
||
51 | */ |
||
52 | 7 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | 4 | public function get(string $purpose, string $value): Token |
|
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | */ |
||
95 | 1 | public function create(string $purpose, $user, array $payload = []): Token |
|
107 | |||
108 | /** |
||
109 | * @inheritDoc |
||
110 | */ |
||
111 | public function consume(Token $token, DateTime $at = null): void |
||
124 | |||
125 | 1 | /** |
|
126 | * @inheritdoc |
||
127 | 1 | */ |
|
128 | public function getUser(Token $token) |
||
132 | } |
||
133 |