1 | <?php |
||
35 | class SimpleAuthenticator implements AuthenticatorInterface |
||
36 | { |
||
37 | /** |
||
38 | * Holds the information is the client authenticated. |
||
39 | * |
||
40 | * @var bool |
||
41 | */ |
||
42 | protected $isAuthenticated = false; |
||
43 | |||
44 | /** |
||
45 | * Authenticate user by connect command. |
||
46 | * |
||
47 | * @param string $login The login name |
||
48 | * @param string $passCode The password |
||
49 | * |
||
50 | * @return string token which will be used for authorization requests (though it isn't actually used yet) |
||
51 | * |
||
52 | * @throws \Exception |
||
53 | */ |
||
54 | public function connect($login, $passCode) |
||
63 | |||
64 | /** |
||
65 | * Returns is authenticated user. |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function getIsAuthenticated() |
||
73 | } |
||
74 |