You are here

private function KeyEntityFormEnhancer::cleanUpOauthTokenData in Apigee Edge 8

Removes Oauth token data.

1 call to KeyEntityFormEnhancer::cleanUpOauthTokenData()
KeyEntityFormEnhancer::validateForm in src/KeyEntityFormEnhancer.php
Additional validation handler for Apigee Edge authentication key forms.

File

src/KeyEntityFormEnhancer.php, line 386

Class

KeyEntityFormEnhancer
Enhances Apigee Edge related Key entity add/edit forms.

Namespace

Drupal\apigee_edge

Code

private function cleanUpOauthTokenData() : void {
  if ($this->oauthTokenStorage instanceof OauthTokenFileStorage) {
    $this->oauthTokenStorage
      ->removeTokenFile();
  }
  else {
    $this->oauthTokenStorage
      ->removeToken();
  }
}