tuupola / slim-basic-auth

PSR-7 and PSR-15 HTTP Basic Authentication Middleware
MIT License
440 stars 66 forks source link

Slight change in documentation's example #78

Closed kristos80 closed 5 years ago

kristos80 commented 5 years ago

Hi Mika and thanks for the great software,

It's not an issue per se, but if you'd like, update the documentation for the custom Authenticator, so that the __invoke method is declared with a return type.

class RandomAuthenticator implements AuthenticatorInterface {
    public function __invoke(array $arguments) : bool {
        return (bool)rand(0,1);
    }
}

Cheers!

tuupola commented 5 years ago

Good catch, thanks!