Skip to content

Instantly share code, notes, and snippets.

@sergekukharev
Last active December 7, 2015 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergekukharev/2de4d523c516a2b62477 to your computer and use it in GitHub Desktop.
Save sergekukharev/2de4d523c516a2b62477 to your computer and use it in GitHub Desktop.
<?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