Respect/Rest — pull request #50 by Fusselwurm (2012-05-16 18:39:26+00:00)
Title: Pass request parameters to AuthBasic routine

I propose passing request parameters to AuthBasic routine as 3rd and following parameters.

Comes handy if the authentication depends on the request parameters. For example, if you were implementing the github repos API with BasicAuthentication, and you want to GET information from a private repository like this `api.github.com/repos/Respect/SecretRepo/commits`, the required username/password would depend on that first parameter:

```php
authBasic('Repository API', function ($name, $password, $userParam, $repoParam) {
$authUser = Users::findByName($name);
return ($password === $authUser->checkPassword($password)) && ($user->mayAccessRepository($userParam, $repoParam));
};

```