public function AppCredentialControllerBase::create in Apigee Edge 8
File
- src/
Entity/ Controller/ AppCredentialControllerBase.php, line 129
Class
- AppCredentialControllerBase
- Base class for developer- and company app credential controller services.
Namespace
Drupal\apigee_edge\Entity\ControllerCode
public function create(string $consumer_key, string $consumer_secret) : AppCredentialInterface {
$credential = $this
->decorated()
->create($consumer_key, $consumer_secret);
$this->eventDispatcher
->dispatch(AppCredentialCreateEvent::EVENT_NAME, new AppCredentialCreateEvent($this
->getAppType(), $this->owner, $this->appName, $credential));
// By removing app from cache we force reload the credentials as well.
$this->appCacheByOwner
->removeEntities([
$this->appName,
]);
return $credential;
}