I have two environments:
- A: Laravel-based application API server
(I have full permission for this) - B: External API server for A
(I don't have permission to access user without his/her authentication)
users table have only two columns, id and external_user_id. id is created by A and external_user_id is created by B.
If I implement a custom provider, I need to follow two contracts:
<?php
interface UserProvider
{
public function retrieveById($identifier);
public function retrieveByToken($identifier, $token);
public function updateRememberToken(Authenticatable $user, $token);
public function retrieveByCredentials(array $credentials);
public function validateCredentials(Authenticatable $user, array $credentials);
}
interface Authenticatable
{
public function getAuthIdentifierName();
public function getAuthIdentifier();
public function getAuthPassword();
public function getRememberToken();
public function setRememberToken($value);
public function getRememberTokenName();
}
However, there are very difficult problem: How do I implement retrieveByCredentials() before verifying?
via Chebli Mohamed
ExpressTech Software Solutions is Leading Laravel Development Company India and USA offers Services like Laravel Development Services, Extension Development, Custom Module . +91-9806724185 or Contact@expresstechsoftwares.com
RépondreSupprimer