I have no database in my laravel application. I am using Soap service for data fetching in this application. I have followed instructions from the solution of this link from stackoverflow to replace the existing laravel's authentication with custom authentication. But when i reached method retrieveByCredentials()
, I couldn't return the stdlib class object for user detail. Instead it returned following error.
(1/1) FatalThrowableError Type error: Argument 1 passed to App\Auth\SoapUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of stdClass given, called in C:\xampp\7.1.7\htdocs\gazebo_revamp\vendor\laravel\framework\src\Illuminate\Auth\SessionGuard.php on line 380
Please shed some light on this.
Illuminate\Contracts\Auth\Authenticatable
hmm, should be clear enough, if you noticed, Laravel did not usestdlib
class, but a class that implements the contract. Please take a look on sample project'sUser
models. – Bagus TesaAuthenticatable
.. – Bagus TesaAuthenticatable
which is not possible from OOP. – kushalbhaktajoshiAuthenticatable
? i suggest to drop the idea outputtingstdclass
, but a custom class - not aModel
- that implementsAuthenticatable
. – Bagus Tesa