You are here

interface EdgeKeyTypeInterface in Apigee Edge 8

Defines an interface for Apigee Edge Key Type plugins.

Hierarchy

Expanded class hierarchy of EdgeKeyTypeInterface

All classes that implement EdgeKeyTypeInterface

11 files declare their use of EdgeKeyTypeInterface
ApigeeAuthKeyInput.php in src/Plugin/KeyInput/ApigeeAuthKeyInput.php
ApigeeAuthKeyType.php in src/Plugin/KeyType/ApigeeAuthKeyType.php
apigee_edge.install in ./apigee_edge.install
Copyright 2018 Google Inc.
AuthenticationFormJsTest.php in tests/src/FunctionalJavascript/Form/AuthenticationFormJsTest.php
Credentials.php in src/Credentials.php

... See full list

File

src/Plugin/EdgeKeyTypeInterface.php, line 28

Namespace

Drupal\apigee_edge\Plugin
View source
interface EdgeKeyTypeInterface extends KeyTypeMultivalueInterface, KeyTypeAuthenticationMethodInterface {

  /**
   * Apigee instance on public cloud.
   *
   * @var string
   */
  public const INSTANCE_TYPE_PUBLIC = 'public';

  /**
   * Apigee instance on private cloud.
   *
   * @var string
   */
  public const INSTANCE_TYPE_PRIVATE = 'private';

  /**
   * Apigee instance on hybrid cloud.
   *
   * @var string
   */
  public const INSTANCE_TYPE_HYBRID = 'hybrid';

  /**
   * ID of the basic authentication method.
   *
   * @var string
   */
  const EDGE_AUTH_TYPE_BASIC = 'basic';

  /**
   * ID of the OAuth authentication method.
   *
   * @var string
   */
  const EDGE_AUTH_TYPE_OAUTH = 'oauth';

  /**
   * ID of the JWT authentication method.
   *
   * @var string
   */
  const EDGE_AUTH_TYPE_JWT = 'jwt';
  const EDGE_AUTH_TYPE_DEFAULT_GCE_SERVICE_ACCOUNT = 'gce-service-account';

  /**
   * The endpoint type for default.
   *
   * @var string
   *
   * @deprecated in apigee_edge:8.x-1.2 and is removed from
   * apigee_edge:8.x-2.0. Check for endpoint type instead.
   *
   * @see EdgeKeyTypeInterface::getEndpointType().
   */
  const EDGE_ENDPOINT_TYPE_DEFAULT = 'default';

  /**
   * The endpoint type for custom.
   *
   * @var string
   *
   * @deprecated in apigee_edge:8.x-1.2 and is removed from
   * apigee_edge:8.x-2.0. Check for endpoint type instead.
   *
   * @see EdgeKeyTypeInterface::getEndpointType().
   */
  const EDGE_ENDPOINT_TYPE_CUSTOM = 'custom';

  /**
   * Gets the authentication type.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The Authentication type.
   */
  public function getAuthenticationType(KeyInterface $key) : string;

  /**
   * Gets the API endpoint.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The API endpoint.
   */
  public function getEndpoint(KeyInterface $key) : string;

  /**
   * Gets the instance type (public, private or hybrid).
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The instance type, either `public`, `private` or `hybrid`.
   */
  public function getInstanceType(KeyInterface $key) : string;

  /**
   * Gets the API endpoint type (default or custom).
   *
   * It returns "default" on a public cloud instance, otherwise "custom".
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The API endpoint type.
   *
   * @deprecated in apigee_edge:8.x-1.2 and is removed from
   * apigee_edge:8.x-2.0. Use getInstanceType() instead.
   *
   * @see https://github.com/apigee/apigee-edge-drupal/issues/268
   */
  public function getEndpointType(KeyInterface $key) : string;

  /**
   * Gets the API organization.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The API organization.
   */
  public function getOrganization(KeyInterface $key) : string;

  /**
   * Gets the API username.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The API username.
   */
  public function getUsername(KeyInterface $key) : string;

  /**
   * Gets the API password.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The API password.
   */
  public function getPassword(KeyInterface $key) : string;

  /**
   * Gets the authorization server.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The authorization server.
   */
  public function getAuthorizationServer(KeyInterface $key) : string;

  /**
   * Gets the client ID.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The client ID.
   */
  public function getClientId(KeyInterface $key) : string;

  /**
   * Gets the client secret.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return string
   *   The client secret.
   */
  public function getClientSecret(KeyInterface $key) : string;

  /**
   * Return the JSON account key decoded as an array.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return array
   *   The account key as an array.
   */
  public function getAccountKey(KeyInterface $key) : array;

  /**
   * Return if you should use the Default Service account.
   *
   * This applies to portals hosted on Google Compute Engine.
   *
   * @param \Drupal\key\KeyInterface $key
   *   The key entity.
   *
   * @return bool
   *   The account key as an array.
   */
  public function useGcpDefaultServiceAccount(KeyInterface $key) : bool;

}

Members

Namesort descending Modifiers Type Description Overrides
EdgeKeyTypeInterface::EDGE_AUTH_TYPE_BASIC constant ID of the basic authentication method.
EdgeKeyTypeInterface::EDGE_AUTH_TYPE_DEFAULT_GCE_SERVICE_ACCOUNT constant
EdgeKeyTypeInterface::EDGE_AUTH_TYPE_JWT constant ID of the JWT authentication method.
EdgeKeyTypeInterface::EDGE_AUTH_TYPE_OAUTH constant ID of the OAuth authentication method.
EdgeKeyTypeInterface::EDGE_ENDPOINT_TYPE_CUSTOM Deprecated constant The endpoint type for custom.
EdgeKeyTypeInterface::EDGE_ENDPOINT_TYPE_DEFAULT Deprecated constant The endpoint type for default.
EdgeKeyTypeInterface::getAccountKey public function Return the JSON account key decoded as an array. 1
EdgeKeyTypeInterface::getAuthenticationType public function Gets the authentication type. 1
EdgeKeyTypeInterface::getAuthorizationServer public function Gets the authorization server. 1
EdgeKeyTypeInterface::getClientId public function Gets the client ID. 1
EdgeKeyTypeInterface::getClientSecret public function Gets the client secret. 1
EdgeKeyTypeInterface::getEndpoint public function Gets the API endpoint. 1
EdgeKeyTypeInterface::getEndpointType Deprecated public function Gets the API endpoint type (default or custom). 1
EdgeKeyTypeInterface::getInstanceType public function Gets the instance type (public, private or hybrid). 1
EdgeKeyTypeInterface::getOrganization public function Gets the API organization. 1
EdgeKeyTypeInterface::getPassword public function Gets the API password. 1
EdgeKeyTypeInterface::getUsername public function Gets the API username. 1
EdgeKeyTypeInterface::INSTANCE_TYPE_HYBRID public constant Apigee instance on hybrid cloud.
EdgeKeyTypeInterface::INSTANCE_TYPE_PRIVATE public constant Apigee instance on private cloud.
EdgeKeyTypeInterface::INSTANCE_TYPE_PUBLIC public constant Apigee instance on public cloud.
EdgeKeyTypeInterface::useGcpDefaultServiceAccount public function Return if you should use the Default Service account. 1
KeyTypeAuthenticationMethodInterface::getAuthenticationMethod public function Gets the authentication method object. 1
KeyTypeMultivalueInterface::serialize public function Serialize an array of key values into a string. 2
KeyTypeMultivalueInterface::unserialize public function Unserialize a string of key values into an array. 2