You are here

class Config in DrupalAuth for SimpleSAMLphp 8

Config service.

Hierarchy

  • class \Drupal\drupalauth4ssp\Config

Expanded class hierarchy of Config

1 string reference to 'Config'
drupalauth4ssp.services.yml in ./drupalauth4ssp.services.yml
drupalauth4ssp.services.yml
1 service uses Config
config in ./drupalauth4ssp.services.yml
Drupal\drupalauth4ssp\Config

File

src/Config.php, line 12

Namespace

Drupal\drupalauth4ssp
View source
class Config {

  /**
   * Cookie name.
   *
   * @var string
   */
  private $cookieName;

  /**
   * List of allowed URLs.
   *
   * @var string
   */
  private $returnToList;

  /**
   * SimpleSAMLphp secret salt.
   *
   * @var string
   */
  private $secretSalt;

  /**
   * SimpleSAMLphp base path.
   *
   * @var string
   */
  private $basePath;

  /**
   * Constructs a config object.
   *
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   The config factory.
   */
  public function __construct(ConfigFactoryInterface $config_factory) {
    $config = $config_factory
      ->get('drupalauth4ssp.settings');
    $this->cookieName = $config
      ->get('cookie_name');
    $this->returnToList = $config
      ->get('returnto_list');

    // Get the secretsalt.
    $this->secretSalt = SimpleSAMLConfig::getSecretSalt();

    // Get the baseurlpath.
    $this->basePath = SimpleSAMLConfiguration::getInstance()
      ->getBasePath();
  }

  /**
   * Returns cookie name.
   *
   * @return string
   *   Cookie name.
   */
  public function getCookieName() {
    return $this->cookieName;
  }

  /**
   * Returns allowed "return to" list.
   *
   * @return string
   *   List of allowed return to URLs.
   */
  public function getReturnToList() {
    return $this->returnToList;
  }

  /**
   * Returns secret salt.
   *
   * @return string
   *   Secret salt.
   */
  public function getSecretSalt() {
    return $this->secretSalt;
  }

  /**
   * Returns base path.
   *
   * @return string
   *   Base path.
   */
  public function getBasePath() {
    return $this->basePath;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Config::$basePath private property SimpleSAMLphp base path.
Config::$cookieName private property Cookie name.
Config::$returnToList private property List of allowed URLs.
Config::$secretSalt private property SimpleSAMLphp secret salt.
Config::getBasePath public function Returns base path.
Config::getCookieName public function Returns cookie name.
Config::getReturnToList public function Returns allowed "return to" list.
Config::getSecretSalt public function Returns secret salt.
Config::__construct public function Constructs a config object.