1 | <?php |
||
28 | trait LogoutPresenterTrait |
||
29 | { |
||
30 | /** @var string */ |
||
31 | protected $tokenName = '_sec'; |
||
32 | |||
33 | /** @var string */ |
||
34 | protected $tokenComponent = __CLASS__; |
||
35 | |||
36 | /** @var NULL|\SixtyEightPublishers\User\Authentication\Csrf\CsrfTokenFactoryInterface */ |
||
37 | private $csrfTokenFactory; |
||
38 | |||
39 | /** |
||
40 | * @param \SixtyEightPublishers\User\Authentication\Csrf\CsrfTokenFactoryInterface $csrfTokenFactory |
||
41 | * |
||
42 | * @return void |
||
43 | *@internal |
||
44 | * |
||
45 | */ |
||
46 | public function injectCsrfTokenFactory(CsrfTokenFactoryInterface $csrfTokenFactory): void |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | * |
||
54 | * @throws \Nette\Application\ForbiddenRequestException |
||
55 | */ |
||
56 | public function startup(): void |
||
79 | |||
80 | /** |
||
81 | * Do redirect in this method, you can also add flash messages etc. |
||
82 | * |
||
83 | * @return void |
||
84 | * @throws \Nette\Application\AbortException |
||
85 | */ |
||
86 | abstract protected function triggerLoggedOut(): void; |
||
87 | |||
88 | /** |
||
89 | * Use can override the default behavior |
||
90 | * |
||
91 | * @return void |
||
92 | * @throws \Nette\Application\ForbiddenRequestException |
||
93 | */ |
||
94 | protected function triggerUserNotLoggedIn(): void |
||
98 | |||
99 | /** |
||
100 | * Use can override the default behavior |
||
101 | * |
||
102 | * @return void |
||
103 | * @throws \Nette\Application\ForbiddenRequestException |
||
104 | */ |
||
105 | protected function triggerInvalidToken(): void |
||
109 | } |
||
110 |