You are here

protected function Oauth2AuthorizeController::isKnownClient in Simple OAuth (OAuth2) & OpenID Connect 8.3

Whether the client with the given scopes is known and already authorized.

Parameters

string $client_uuid: The client UUID.

string[] $scopes: The list of scopes.

Return value

bool TRUE if the client is authorized, FALSE otherwise.

1 call to Oauth2AuthorizeController::isKnownClient()
Oauth2AuthorizeController::authorize in simple_oauth_extras/src/Controller/Oauth2AuthorizeController.php
Authorizes the code generation or prints the confirmation form.

File

simple_oauth_extras/src/Controller/Oauth2AuthorizeController.php, line 267

Class

Oauth2AuthorizeController
Oauth2AuthorizeController.

Namespace

Drupal\simple_oauth_extras\Controller

Code

protected function isKnownClient($client_uuid, array $scopes) {
  if (!$this->configFactory
    ->get('simple_oauth.settings')
    ->get('remember_clients')) {
    return FALSE;
  }
  return $this->knownClientRepository
    ->isAuthorized($this
    ->currentUser()
    ->id(), $client_uuid, $scopes);
}