1 | <?php |
||
14 | class InteractiveAuth |
||
15 | { |
||
16 | /** |
||
17 | * @var Authenticator |
||
18 | */ |
||
19 | protected $authService; |
||
20 | |||
21 | /** |
||
22 | * @var SessionManager |
||
23 | */ |
||
24 | protected $sessionManager; |
||
25 | |||
26 | /** |
||
27 | * @param Authenticator $authService |
||
28 | * @param SessionManager $sessionManager |
||
29 | * @throws RuntimeException |
||
30 | */ |
||
31 | public function __construct(Authenticator $authService, SessionManager $sessionManager) |
||
40 | |||
41 | /** |
||
42 | * @param string $identity |
||
43 | * @param string $credential |
||
44 | * @throws RuntimeException |
||
45 | * @return Result |
||
46 | */ |
||
47 | public function login($identity, $credential) |
||
60 | |||
61 | /** |
||
62 | * |
||
63 | */ |
||
64 | public function logout() |
||
72 | |||
73 | /** |
||
74 | * @param AdapterInterface $adapter |
||
75 | * @return Result |
||
76 | */ |
||
77 | public function connect(AdapterInterface $adapter) |
||
81 | } |
||
82 |