Skip to content

Commit

Permalink
Merge pull request #28 from dealense7/fix_passport_provider_problem
Browse files Browse the repository at this point in the history
Fix Passport Provider Problem
  • Loading branch information
akalongman authored Apr 4, 2023
2 parents deeee04 + 0ff6e09 commit 803c8c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Lodash/Auth/Passport/Guards/TokenGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Longman\LaravelLodash\Auth\Passport\Guards;

use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Http\Request;
use Laravel\Passport\Guards\TokenGuard as BaseTokenGuard;
use Laravel\Passport\PassportUserProvider;
use League\OAuth2\Server\ResourceServer;
Expand All @@ -19,11 +20,13 @@ public function __construct(
TokenRepositoryContract $tokens,
ClientRepositoryContract $clients,
Encrypter $encrypter,
Request $request,
) {
$this->server = $server;
$this->tokens = $tokens;
$this->clients = $clients;
$this->provider = $provider;
$this->encrypter = $encrypter;
$this->request = $request;
}
}
3 changes: 2 additions & 1 deletion src/Lodash/Auth/Passport/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ protected function makeGuard(array $config): RequestGuard
$this->app->make(TokenRepositoryContract::class),
$this->app->make(ClientRepositoryContract::class),
$this->app->make('encrypter'),
))->user($request);
$request,
))->user();
}, $this->app['request']);
}

Expand Down

0 comments on commit 803c8c2

Please sign in to comment.