Last active
December 7, 2015 16:57
-
-
Save sergekukharev/2de4d523c516a2b62477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AuthorizerFake implements Authorizer { | |
public $allowedUsers = [ | |
'test_user' => '123456', | |
'test_admin' => '123456' | |
]; | |
public authorize($username, $password) { | |
return array_key_exists($this->allowedUsers, $username) | |
&& $this->allowedUsers[$username] === $password; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment