You are here

public function Basic::getAuthenticationOptions in Migrate Plus 8.3

Same name and namespace in other branches
  1. 8.5 src/Plugin/migrate_plus/authentication/Basic.php \Drupal\migrate_plus\Plugin\migrate_plus\authentication\Basic::getAuthenticationOptions()
  2. 8.2 src/Plugin/migrate_plus/authentication/Basic.php \Drupal\migrate_plus\Plugin\migrate_plus\authentication\Basic::getAuthenticationOptions()
  3. 8.4 src/Plugin/migrate_plus/authentication/Basic.php \Drupal\migrate_plus\Plugin\migrate_plus\authentication\Basic::getAuthenticationOptions()

Performs authentication, returning any options to be added to the request.

@link http://docs.guzzlephp.org/en/latest/request-options.html

Return value

array Options (such as Authentication headers) to be added to the request.

Overrides AuthenticationPluginInterface::getAuthenticationOptions

File

src/Plugin/migrate_plus/authentication/Basic.php, line 21

Class

Basic
Provides basic authentication for the HTTP resource.

Namespace

Drupal\migrate_plus\Plugin\migrate_plus\authentication

Code

public function getAuthenticationOptions() {
  return [
    'auth' => [
      $this->configuration['username'],
      $this->configuration['password'],
    ],
  ];
}