Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Interface error when using the NoDatabase provider with JWT guard #819

Open
remils opened this issue Apr 11, 2023 · 0 comments
Open

Interface error when using the NoDatabase provider with JWT guard #819

remils opened this issue Apr 11, 2023 · 0 comments

Comments

@remils
Copy link

remils commented Apr 11, 2023

  • Adldap2 Version: #.#
  • LDAP Type:
  • PHP Version: #.#

Description:

is it possible to make friends with a package in the context of your application?

Steps To Reproduce:

  1. install:
    composer require tymon/jwt-auth

  2. config/ldap_auth.php
    'provider' => Adldap\Laravel\Auth\NoDatabaseUserProvider::class

  3. config/auth.php

    'guards' => [
        'api' => [
            'driver' => 'jwt',
            'provider' => 'ldap_users',
        ]
    ],
    'providers' => [
        'ldap_users' => [
            'driver' => 'ldap'
        ]
    ],
  1. execute
$token = auth('api')->attempt([
    'username' => $request->username,
    'password' => $request->password,
]);

  1. Errror

TypeError: Tymon\JWTAuth\JWTGuard::login(): Argument #1 ($user) must be of type Tymon\JWTAuth\Contracts\JWTSubject, Adldap\Models\User given, called in /var/www/vendor/tymon/jwt-auth/src/JWTGuard.php on line 124 in file /var/www/vendor/tymon/jwt-auth/src/JWTGuard.php on line 136

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant