FOF30\TransparentAuthentication\TransparentAuthentication::__construct PHP Method

__construct() public method

The optional $config array can contain the following values (corresponding to the same-named properties of this class): timeStep, totpKey, cryptoKey, basicAuthUsername, queryParam, queryParamUsername, queryParamPassword, logoutOnExit. See the property descriptions for more information.
public __construct ( Container $container, array $config = [] )
$container FOF30\Container\Container
$config array
    function __construct(Container $container, array $config = array())
    {
        $this->container = $container;
        // Initialise from the $config array
        $knownKeys = array('timeStep', 'totpKey', 'cryptoKey', 'basicAuthUsername', 'queryParam', 'queryParamUsername', 'queryParamPassword', 'logoutOnExit');
        foreach ($knownKeys as $key) {
            if (isset($config[$key])) {
                $this->{$key} = $config[$key];
            }
        }
        if (isset($config['authenticationMethods'])) {
            $this->authenticationMethods = $this->parseAuthenticationMethods($config['authenticationMethods']);
        }
    }