S
S
Stanislav Pochepko2016-04-07 22:57:33
Laravel
Stanislav Pochepko, 2016-04-07 22:57:33

How to make auth driver for Sentinel in Laravel 5.1?

I can't think. Do I understand correctly. Sentinel has its own authentication. And according to the idea, you can make a driver for Sentinel so that you can use the same Auth object in the application. At the same time, it is easy to change authentication methods (eloquent / sentinel). I did not find anything in the sentinel documentation. I found a driver on the Internet , but something seems to me that this is not it. It’s not clear why it says to use it like that

'guards' => [
    'api' => [
        'driver' => 'cent',
        'provider' => 'users',
    ],
],

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2016-04-07
@DJZT

What exactly is unclear? Auth drivers are written in guards.
We prescribe in guards (for web or api) 'cent' and use it.
Through guard('api') you can get guard which is registered in

'guards' => [
    'api' => [
        'driver' => 'cent',
        'provider' => 'users',
    ],
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question