diff --git a/modules/exampleauth/lib/Auth/Source/StaticSource.php b/modules/exampleauth/lib/Auth/Source/StaticSource.php index d81dd325638fe2c2e1f3e64d45ca329310115c54..ca17a378cc36f1fb41b2d25b556d1491a626480b 100644 --- a/modules/exampleauth/lib/Auth/Source/StaticSource.php +++ b/modules/exampleauth/lib/Auth/Source/StaticSource.php @@ -14,42 +14,46 @@ namespace SimpleSAML\Module\exampleauth\Auth\Source; class StaticSource extends \SimpleSAML\Auth\Source { - /** - * The attributes we return. - */ - private $attributes; - - /** - * Constructor for this authentication source. - * - * @param array $info Information about this authentication source. - * @param array $config Configuration. - */ - public function __construct($info, $config) - { - assert(is_array($info)); - assert(is_array($config)); - - // Call the parent constructor first, as required by the interface - parent::__construct($info, $config); - - // Parse attributes - try { - $this->attributes = \SimpleSAML\Utils\Attributes::normalizeAttributesArray($config); - } catch (\Exception $e) { - throw new \Exception('Invalid attributes for authentication source '. - $this->authId.': '.$e->getMessage()); - } - } - - /** - * Log in using static attributes. - * - * @param array &$state Information about the current authentication. - */ - public function authenticate(&$state) - { - assert(is_array($state)); - $state['Attributes'] = $this->attributes; - } + /** + * The attributes we return. + */ + private $attributes; + + + /** + * Constructor for this authentication source. + * + * @param array $info Information about this authentication source. + * @param array $config Configuration. + */ + public function __construct($info, $config) { + assert(is_array($info)); + assert(is_array($config)); + + // Call the parent constructor first, as required by the interface + parent::__construct($info, $config); + + + // Parse attributes + try { + $this->attributes = \SimpleSAML\Utils\Attributes::normalizeAttributesArray($config); + } catch (\Exception $e) { + throw new \Exception('Invalid attributes for authentication source ' . + $this->authId . ': ' . $e->getMessage()); + } + + } + + + /** + * Log in using static attributes. + * + * @param array &$state Information about the current authentication. + */ + public function authenticate(&$state) { + assert(is_array($state)); + + $state['Attributes'] = $this->attributes; + } + }