<?xml version="1.0" encoding="UTF-8"?>
<authdriver name="smb" enabled="false" label="CONF_MESSAGE[SMB Authentication]" description="CONF_MESSAGE[Authenticate user by directly connecting to an SMB share]" mixins="authdriver_commons"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
    <client_settings>
        <resources>
            <i18n namespace="smb_auth" path="plugins/auth.smb/i18n"/>
        </resources>
    </client_settings>
	<server_settings>
		<param name="REPOSITORY_ID" type="select" choices="json_list:list_all_repositories_json" label="CONF_MESSAGE[Workspace]" description="CONF_MESSAGE[ID of the workspace used to validate credentials]" mandatory="true"/>
		<param name="ADMIN_USER" type="string" label="CONF_MESSAGE[Admin user]" description="CONF_MESSAGE[The ID of an existing admin for Pydio (using conf.serial)]" mandatory="true"/>
        <param name="SMBCLIENT" type="string" label="CONF_MESSAGE[Smbclient]" description="CONF_MESSAGE[Path to smbclient executable, considered to be in the path by default.]" mandatory="true" default="smbclient"/>
	</server_settings>
	<class_definition filename="plugins/auth.smb/SmbAuthDriver.php" classname="Pydio\Auth\Driver\SmbAuthDriver"/>
	<registry_contributions>
		<external_file filename="plugins/core.auth/standard_auth_actions.xml" include="actions/action[@name='login'],actions/action[@name='get_seed'],actions/action[@name='get_secure_token'],actions/action[@name='get_captcha'],actions/action[@name='back']" exclude=""/>
		<actions>
			<!-- OVERRIDE LOGOUT -->
			<action name="smb_logout" expireDefault="true">
				<gui text="164" title="169" iconClass="mdi mdi-logout" accessKey="" hasAccessKey="false">
					<context selection="false" dir="" recycle="false"
						actionBar="true" contextMenu="false" infoPanel="false"
						actionBarGroup="zlogin,minisite"/>
				</gui>
				<rightsContext noUser="false" userLogged="only" guestLogged="hidden" read="false" write="false" adminOnly=""/>
				<processing>
					<clientCallback><![CDATA[
                        PydioApi.getClient().request({get_action:'smb_logout'});
                    ]]></clientCallback>
					<serverCallback methodName="logoutCallback"></serverCallback>
				</processing>
			</action>
		</actions>
	</registry_contributions>
	<dependencies>
		<pluginClass pluginName="access.smb"/>
	</dependencies>
</authdriver>
