Skip to content

Commit

Permalink
add parm validateUser
Browse files Browse the repository at this point in the history
  • Loading branch information
attoiuma committed Jul 28, 2019
1 parent 0b0b43d commit 938a0ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Grant/PasswordGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,17 @@ protected function validateUser(ServerRequestInterface $request, ClientEntityInt
throw OAuthServerException::invalidRequest('password');
}

$user = $this->userRepository->getUserEntityByUserCredentials(
$provider = $this->getRequestParameter('provider', $request);
if (is_null($provider)) {
throw OAuthServerException::invalidRequest('provider');
}

$user = $this->userRepository->getEntityByUserCredentials(
$username,
$password,
$this->getIdentifier(),
$client
$client,
$provider
);

if ($user instanceof UserEntityInterface === false) {
Expand Down

0 comments on commit 938a0ca

Please sign in to comment.