You are here

public function AppCredentialControllerBase::overrideScopes in Apigee Edge 8

File

src/Entity/Controller/AppCredentialControllerBase.php, line 221

Class

AppCredentialControllerBase
Base class for developer- and company app credential controller services.

Namespace

Drupal\apigee_edge\Entity\Controller

Code

public function overrideScopes(string $consumer_key, array $scopes) : AppCredentialInterface {
  $credential = $this
    ->decorated()
    ->overrideScopes($consumer_key, $scopes);

  // By removing app from cache we force reload the credentials as well.
  $this->appCacheByOwner
    ->removeEntities([
    $this->appName,
  ]);
  return $credential;
}