You are here

protected function Oauth2AuthorizeController::isKnownClient in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/Controller/Oauth2AuthorizeController.php \Drupal\simple_oauth\Controller\Oauth2AuthorizeController::isKnownClient()

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 src/Controller/Oauth2AuthorizeController.php
Authorizes the code generation or prints the confirmation form.

File

src/Controller/Oauth2AuthorizeController.php, line 251

Class

Oauth2AuthorizeController
Oauth2AuthorizeController.

Namespace

Drupal\simple_oauth\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);
}