| 1 | <?php |
||
| 11 | class HardcodedUserPlugin extends BaseAuthPlugin |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Auth plugin hook to be fired on login. |
||
| 15 | * |
||
| 16 | * @param string $username |
||
| 17 | * @param string $password |
||
| 18 | * @return int |
||
| 19 | */ |
||
| 20 | public function login($username, $password) |
||
| 21 | { |
||
| 22 | return ($username === 'foo' && $password === 'bar') ? Auth::RESULT_SUCCESS : Auth::RESULT_FAILURE; |
||
| 23 | } |
||
| 24 | } |
||
| 25 |