1 | <?php |
||
22 | class SkautisAuthenticator extends AbstractGuardAuthenticator //implements GuardAuthenticatorInterface |
||
|
|||
23 | { |
||
24 | const SKAUTIS_LOGIN_ID = "skautis_login_id"; |
||
25 | const SKAUTIS_PERSON_ID = "skautis_person_id"; |
||
26 | |||
27 | /** |
||
28 | * @var RouterInterface |
||
29 | */ |
||
30 | protected $router; |
||
31 | |||
32 | /** |
||
33 | * @var Skautis |
||
34 | */ |
||
35 | protected $skautis; |
||
36 | |||
37 | /** |
||
38 | * @var Session |
||
39 | */ |
||
40 | protected $session; |
||
41 | |||
42 | /** |
||
43 | * @var UserLoader |
||
44 | */ |
||
45 | protected $userLoader; |
||
46 | |||
47 | /** |
||
48 | * @var bool |
||
49 | */ |
||
50 | protected $confirm; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | protected $anonymousSkautLogin; |
||
56 | |||
57 | /** |
||
58 | * SkautisAuthenticator constructor. |
||
59 | * @param Skautis $skautis |
||
60 | * @param RouterInterface $router |
||
61 | * @param Session $session |
||
62 | * @param UserLoader $userLoader |
||
63 | * @param bool $confirm |
||
64 | * @param bool $anonymousSkautLogin |
||
65 | */ |
||
66 | public function __construct(Skautis $skautis, RouterInterface $router, Session $session, UserLoader $userLoader, $confirm = true, $anonymousSkautLogin = false) |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function start(Request $request, AuthenticationException $authException = null) |
||
83 | |||
84 | /** |
||
85 | * @inheritdoc |
||
86 | */ |
||
87 | public function getCredentials(Request $request) |
||
110 | |||
111 | /** |
||
112 | * @inheritdoc |
||
113 | */ |
||
114 | public function getUser($credentials, UserProviderInterface $userProvider) |
||
130 | |||
131 | /** |
||
132 | * @inheritdoc |
||
133 | */ |
||
134 | public function checkCredentials($credentials, UserInterface $user) |
||
139 | |||
140 | /** |
||
141 | * @inheritdoc |
||
142 | */ |
||
143 | public function onAuthenticationFailure(Request $request, AuthenticationException $exception) |
||
147 | |||
148 | /** |
||
149 | * @inheritdoc |
||
150 | */ |
||
151 | public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) |
||
155 | |||
156 | /** |
||
157 | * @inheritdoc |
||
158 | */ |
||
159 | public function supportsRememberMe() |
||
163 | |||
164 | /** |
||
165 | * @param boolean $confirm |
||
166 | */ |
||
167 | public function setConfirm($confirm) |
||
172 | } |