Total Complexity | 5 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | abstract class BaseAuthPlugin implements AuthPluginInterface |
||
11 | { |
||
12 | /** |
||
13 | * Calling Security Class |
||
14 | * |
||
15 | * @var Auth |
||
16 | */ |
||
17 | private $auth; |
||
18 | |||
19 | /** |
||
20 | * Store the Auth class into which this plugin will plug. Called by the Auth class on plugin addition. |
||
21 | * |
||
22 | * @param Auth $auth |
||
23 | */ |
||
24 | 11 | public function setAuth(Auth $auth) |
|
25 | { |
||
26 | 11 | $this->auth = $auth; |
|
27 | 11 | } |
|
28 | |||
29 | /** |
||
30 | * Get the Auth class instance |
||
31 | * |
||
32 | * @return Auth |
||
33 | */ |
||
34 | 3 | protected function getAuth() |
|
35 | { |
||
36 | 3 | return $this->auth; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * Attempt to log the user in to the system. |
||
41 | * |
||
42 | * @param string $username The unique identifier for the user. |
||
43 | * @param string $password The user's password. |
||
44 | * @return int The login result. |
||
45 | */ |
||
46 | 1 | public function login($username, $password) |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * Attempt to log the user out of the system. |
||
53 | * |
||
54 | * @return int The logout result. |
||
55 | */ |
||
56 | 1 | public function logout() |
|
57 | { |
||
58 | 1 | return Auth::RESULT_NOOP; |
|
59 | } |
||
60 | |||
61 | /** |
||
62 | * Attempt to verify the user's login status. |
||
63 | * |
||
64 | * @return int The user's login status. |
||
65 | */ |
||
66 | 1 | public function verify() |
|
69 | } |
||
70 | } |
||
71 |