<?xml version="1.0"?>
<!--
/**
 * MageSpecialist
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to info@magespecialist.it so we can send you a copy immediately.
 *
 * @category   MSP
 * @package    MSP_TwoFactorAuth
 * @copyright  Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="security" translate="label" sortOrder="200">
            <label>Security</label>
        </tab>

        <section id="msp_securitysuite_twofactorauth" translate="label" type="text" sortOrder="500" showInDefault="1"
                 showInWebsite="1" showInStore="1">
            <class>separator-top</class>
            <label>2FA</label>
            <tab>security</tab>
            <resource>MSP_TwoFactorAuth::config</resource>

            <group id="general" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0"
                   showInStore="0">
                <label>General</label>
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
                       showInStore="0">
                    <label>Enable Two Factor Auth</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field canRestore="1" id="force_providers" translate="label" type="multiselect" sortOrder="30"
                       showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Force providers</label>
                    <source_model>MSP\TwoFactorAuth\Model\Config\Source\Provider</source_model>
                    <comment>Force providers to be used by all users in this system. Leave empty to allow individual
                        selection.
                    </comment>
                </field>
            </group>

            <group id="google" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0"
                   showInStore="0">
                <label>Google Authenticator</label>
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
                       showInStore="0">
                    <label>Enable this provider</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field canRestore="1" id="allow_trusted_devices" translate="label" type="select" sortOrder="20"
                       showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable "trust this device" option</label>
                    <comment>NOTE: This option should be used in HTTPS only environments</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>

            <group id="u2fkey" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0"
                   showInStore="0">
                <label>U2F Devices (Yubikey and others)</label>
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
                       showInStore="0">
                    <label>Enable this provider</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Requires HTTPS to work</comment>
                </field>
                <field canRestore="1" id="allow_trusted_devices" translate="label" type="select" sortOrder="20"
                       showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable "trust this device" option</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>

            <group id="duo" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="0"
                   showInStore="0">
                <label>Duo Security</label>
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
                       showInStore="0">
                    <label>Enable this provider</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="integration_key" translate="label comment" type="password" sortOrder="20" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>Integration key</label>
                </field>
                <field id="secret_key" translate="label comment" type="password" sortOrder="30" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>Secret key</label>
                </field>
                <field id="api_hostname" translate="label comment" type="text" sortOrder="40" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>API hostname</label>
                </field>
            </group>

            <group id="authy" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="0"
                   showInStore="0">
                <label>Authy</label>
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
                       showInStore="0">
                    <label>Enable this provider</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="api_key" translate="label comment" type="password" sortOrder="20" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>API key</label>
                </field>
                <field canRestore="1" id="allow_trusted_devices" translate="label" type="select" sortOrder="30"
                       showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable "trust this device" option</label>
                    <comment>NOTE: This option should be used in HTTPS only environments</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field canRestore="1" id="onetouch_message" translate="label" type="text" sortOrder="40"
                       showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>OneTouch Message</label>
                </field>
            </group>
        </section>
    </system>
</config>