<?php

namespace modules\edgegateway\config;

use Exception;
use traits\module_config_variable;

class edgegateway_broker_auth_mode_c
{
    use module_config_variable;

    /**
     * @throws Exception
     */
    public function __construct()
    {
        $this->setupConfigVariable(
            'edgegateway',
            'broker_auth_mode',
            'string',
            true,
            ['manager', 'stub'],
            'The broker authentication mode. Production should use manager.',
            'manager',
            false,
            trim((string)(getenv('EDGE_AUTH_MODE') ?: '')) ?: 'manager'
        );
    }
}
