You are here

public function EdgeKeyTypeBase::useGcpDefaultServiceAccount in Apigee Edge 8

Return if you should use the Default Service account.

This applies to portals hosted on Google Compute Engine.

Parameters

\Drupal\key\KeyInterface $key: The key entity.

Return value

bool The account key as an array.

Overrides EdgeKeyTypeInterface::useGcpDefaultServiceAccount

2 calls to EdgeKeyTypeBase::useGcpDefaultServiceAccount()
ApigeeAuthKeyType::getAuthenticationMethod in src/Plugin/KeyType/ApigeeAuthKeyType.php
Gets the authentication method object.
EdgeKeyTypeBase::getAuthenticationType in src/Plugin/EdgeKeyTypeBase.php
Gets the authentication type.

File

src/Plugin/EdgeKeyTypeBase.php, line 176

Class

EdgeKeyTypeBase
Defines a base class for Apigee Edge Key Type plugins.

Namespace

Drupal\apigee_edge\Plugin

Code

public function useGcpDefaultServiceAccount(KeyInterface $key) : bool {
  return !empty($key
    ->getKeyValues()['gcp_hosted']);
}