You are here

abstract class RestfulAuthenticationBase in RESTful 7

@file Contains RestfulAuthenticationBase.

Hierarchy

Expanded class hierarchy of RestfulAuthenticationBase

File

plugins/authentication/RestfulAuthenticationBase.php, line 8
Contains RestfulAuthenticationBase.

View source
abstract class RestfulAuthenticationBase extends \RestfulPluginBase implements \RestfulAuthenticationInterface {

  /**
   * Settings from the plugin definition.
   *
   * @var array
   */
  protected $settings;

  /**
   * Constructor.
   */
  public function __construct($plugin) {
    $this
      ->setPlugin($plugin);
    $this->settings = $this
      ->getPluginKey('settings');
  }

  /**
   * {@inheritdoc}
   */
  public function applies(array $request = array(), $method = \RestfulInterface::GET) {

    // By default assume that the request can be checked for authentication.
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return $this
      ->getPluginKey('name');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RestfulAuthenticationBase::$settings protected property Settings from the plugin definition.
RestfulAuthenticationBase::applies public function Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist. Overrides RestfulAuthenticationInterface::applies 2
RestfulAuthenticationBase::getName public function Get the name of the authentication plugin. Overrides RestfulAuthenticationInterface::getName
RestfulAuthenticationBase::__construct public function Constructor. Overrides RestfulPluginBase::__construct
RestfulAuthenticationInterface::authenticate public function Authenticate the request by trying to match a user. 3
RestfulPluginBase::$plugin protected property The plugin definition array.
RestfulPluginBase::getPlugin public function Gets information about the restful plugin. Overrides RestfulPluginInterface::getPlugin
RestfulPluginBase::getPluginKey public function Gets information about the restful plugin key. Overrides RestfulPluginInterface::getPluginKey
RestfulPluginBase::setPlugin public function Sets information about the restful plugin. Overrides RestfulPluginInterface::setPlugin
RestfulPluginBase::setPluginKey public function Gets information about the restful plugin key. Overrides RestfulPluginInterface::setPluginKey