| 123456789101112131415161718192021222324 |
- <?php
- namespace App\Auth;
- use App\Support\Magento1Password;
- use Illuminate\Auth\EloquentUserProvider;
- use Illuminate\Contracts\Auth\Authenticatable as UserContract;
- class CustomerUserProvider extends EloquentUserProvider
- {
- /**
- * {@inheritdoc}
- */
- public function validateCredentials(UserContract $user, array $credentials): bool
- {
- $plain = $credentials['password'] ?? null;
- if (! is_string($plain) || $plain === '') {
- return false;
- }
- return Magento1Password::attempt($user, $plain);
- }
- }
|