You are here

public static function Base::getMethods in DRD Agent 8.3

Same name in this branch
  1. 8.3 src/Crypt/Base.php \Drupal\drd_agent\Crypt\Base::getMethods()
  2. 8.3 src/Agent/Auth/Base.php \Drupal\drd_agent\Agent\Auth\Base::getMethods()
Same name and namespace in other branches
  1. 4.0.x src/Agent/Auth/Base.php \Drupal\drd_agent\Agent\Auth\Base::getMethods()

Get a list of all implemented authentication methods.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container:

Return value

array Array of all implemented authentication methods.

Overrides BaseInterface::getMethods

1 call to Base::getMethods()
Base::authenticate in src/Agent/Action/Base.php
Authenticate the request or throw an exception.

File

src/Agent/Auth/Base.php, line 65

Class

Base
Base class for Remote DRD Auth Methods.

Namespace

Drupal\drd_agent\Agent\Auth

Code

public static function getMethods(ContainerInterface $container) : array {
  $methods = array(
    'username_password' => 'UsernamePassword',
    'shared_secret' => 'SharedSecret',
  );
  foreach ($methods as $key => $class) {
    $classname = "\\Drupal\\drd_agent\\Agent\\Auth\\{$class}";

    /** @noinspection PhpUndefinedMethodInspection */
    $methods[$key] = $classname::create($container);
  }
  return $methods;
}