mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Added $mustValidateSecret parameter to ClientRepositoryInterface:: getClientEntity(). Fixes #550
This commit is contained in:
@@ -161,7 +161,8 @@ abstract class AbstractGrant implements GrantTypeInterface
|
|||||||
$client = $this->clientRepository->getClientEntity(
|
$client = $this->clientRepository->getClientEntity(
|
||||||
$clientId,
|
$clientId,
|
||||||
$this->getIdentifier(),
|
$this->getIdentifier(),
|
||||||
$clientSecret
|
$clientSecret,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$client instanceof ClientEntityInterface) {
|
if (!$client instanceof ClientEntityInterface) {
|
||||||
|
@@ -165,7 +165,9 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
|||||||
|
|
||||||
$client = $this->clientRepository->getClientEntity(
|
$client = $this->clientRepository->getClientEntity(
|
||||||
$clientId,
|
$clientId,
|
||||||
$this->getIdentifier()
|
$this->getIdentifier(),
|
||||||
|
null,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($client instanceof ClientEntityInterface === false) {
|
if ($client instanceof ClientEntityInterface === false) {
|
||||||
|
@@ -117,7 +117,9 @@ class ImplicitGrant extends AbstractAuthorizeGrant
|
|||||||
|
|
||||||
$client = $this->clientRepository->getClientEntity(
|
$client = $this->clientRepository->getClientEntity(
|
||||||
$clientId,
|
$clientId,
|
||||||
$this->getIdentifier()
|
$this->getIdentifier(),
|
||||||
|
null,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($client instanceof ClientEntityInterface === false) {
|
if ($client instanceof ClientEntityInterface === false) {
|
||||||
|
@@ -19,8 +19,10 @@ interface ClientRepositoryInterface extends RepositoryInterface
|
|||||||
* @param string $clientIdentifier The client's identifier
|
* @param string $clientIdentifier The client's identifier
|
||||||
* @param string $grantType The grant type used
|
* @param string $grantType The grant type used
|
||||||
* @param null|string $clientSecret The client's secret (if sent)
|
* @param null|string $clientSecret The client's secret (if sent)
|
||||||
|
* @param bool $mustValidateSecret If true the client must attempt to validate the secret unless the client
|
||||||
|
* is confidential
|
||||||
*
|
*
|
||||||
* @return \League\OAuth2\Server\Entities\ClientEntityInterface
|
* @return \League\OAuth2\Server\Entities\ClientEntityInterface
|
||||||
*/
|
*/
|
||||||
public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null);
|
public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null, $mustValidateSecret = true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user