/** * Initializes a SimpleSAML_Auth_Simple object. * * @param string $authSource The ID of the authentication source to use. This will * override the authentication source set in `app/Config/bootstrap.php`. */ public function __construct(ComponentCollection $collection, array $settings, string $authSource = NULL) { parent::__construct($collection, $settings); // Check the config if (Configure::read('Saml.SimpleSamlPath') != NULL) { $this->path = Configure::read('Saml.SimpleSamlPath'); } else { throw new Exception('Parameter Saml.SimpleSamlPath is missing from the configuration file.'); } if ($authSource != NULL) { $this->authSource = $authSource; } elseif (Configure::read('Saml.AuthSource') != NULL) { $this->authSource = Configure::read('Saml.AuthSource'); } // Initialize simpleSAMLphp require_once $this->path . '/lib/_autoload.php'; $this->as = new SimpleSAML_Auth_Simple($this->authSource); }
/** * Constructor. Sets default passwordHasher to Blowfish * * @param ComponentCollection $collection The Component collection used on this request. * @param array $settings Array of settings to use. */ public function __construct(ComponentCollection $collection, $settings) { $this->settings['passwordHasher'] = 'Blowfish'; parent::__construct($collection, $settings); }