ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

How do I use basic auth (HTTP login) filter with this plugin? #58

Closed hfingler closed 9 years ago

hfingler commented 9 years ago

I've read the entire readme and all the issues. Some people faced this problem and did not explain how they fixed it. Also, everyone who tried to help did not put out an example.

The default is:

Route::filter('auth.basic', function()
{
    return Auth::basic();
});

I have tried anything I could think of, but did not manage to work. Shouldn't it be something like this:

    return Auth::admin->basic();

I don't want to redirect the user to a login page, I want an HTTP login request. I'd appreciate any help. Thanks.

ollieread commented 9 years ago

It's actually a method, not a property, so Auth::admin()->basic().