<?xml version="1.0" encoding="UTF-8"?>
<authdriver name="smb" label="CONF_MESSAGE[SMB Authentification]" 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="string" label="CONF_MESSAGE[Repository]" description="CONF_MESSAGE[Id of the repository to use for testing connexion]" mandatory="true"/>
		<param name="ADMIN_USER" type="string" label="CONF_MESSAGE[Admin user]" description="CONF_MESSAGE[The ID of an existing admin for Ajaxplorer (using conf.serial)]" mandatory="true"/>
	</server_settings>
	<class_definition filename="plugins/auth.smb/class.smbAuthDriver.php" classname="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" src="decrypted.png"
					accessKey="" hasAccessKey="false">
					<context selection="false" dir="" recycle="false"
						actionBar="true" contextMenu="false" infoPanel="false"
						actionBarGroup="user">
					</context>
				</gui>
				<rightsContext noUser="false" userLogged="only" guestLogged="hidden" read="false" write="false" adminOnly=""></rightsContext>			
				<processing>
					<clientCallback prepareModal="false"><![CDATA[
						clearRememberData();
						var connexion = new Connexion();
						connexion.addParameter('get_action', 'smb_logout');
						connexion.onComplete = function(transport){
							ajaxplorer.actionBar.parseXmlMessage(transport.responseXML);
							};
						connexion.sendAsync();
						]]></clientCallback>
					<serverCallback methodName="logoutCallback"></serverCallback>
				</processing>
			</action>
		</actions>
	</registry_contributions>
	<dependencies>
		<pluginClass pluginName="access.smb"/>
	</dependencies>	
</authdriver>