mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Make ClientRepositoryInterface more flexible
This small change will allow the use of the ```ClientRepositoryInterface``` for more use cases than simply validating clients when authorizing them. There might be some places where this change will affect the behavior. I also think the ```$mustValidateSecret``` is redundant since in an implementation a check could be done wether ```$clientSecret``` is null or not.
This commit is contained in:
@ -17,12 +17,12 @@ interface ClientRepositoryInterface extends RepositoryInterface
|
|||||||
* Get a client.
|
* Get a client.
|
||||||
*
|
*
|
||||||
* @param string $clientIdentifier The client's identifier
|
* @param string $clientIdentifier The client's identifier
|
||||||
* @param string $grantType The grant type used
|
* @param null|string $grantType The grant type used (if sent)
|
||||||
* @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
|
* @param bool $mustValidateSecret If true the client must attempt to validate the secret unless the client
|
||||||
* is confidential
|
* is confidential
|
||||||
*
|
*
|
||||||
* @return \League\OAuth2\Server\Entities\ClientEntityInterface
|
* @return \League\OAuth2\Server\Entities\ClientEntityInterface
|
||||||
*/
|
*/
|
||||||
public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null, $mustValidateSecret = true);
|
public function getClientEntity($clientIdentifier, $grantType = null, $clientSecret = null, $mustValidateSecret = false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user