--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="XEMELIOS-auth-noauth" default="usage" basedir=".">
+ <import file="../../common-tasks.xml"/>
+ <description>Builds, tests, and runs the project XEMELIOS_3 auth-noauth</description>
+ <property file="${user.home}/.ant.properties"/>
+
+ <target name="usage">
+ <echo>
+ Using ${ant.version}
+
+ These are targets supported by this ANT build script:
+
+ compile - compile all .java files, except
+ thoses in ./tmp folder.
+ clean - deletes all compiled and generated
+ files and resources.
+ jars - build jar files.
+
+ Do not call this script directly, use the one located
+ at root of projet (in ../..) instead.
+ </echo>
+ </target>
+
+ <target name="compile" depends="mk-output-dirs,define-compile-debug,prepare">
+ <javac srcdir="java" destdir="build/classes" debug="${compile.debug}" encoding="ISO-8859-1">
+ <classpath>
+ <pathelement path="../core/build/classes"/>
+ <pathelement path="../starter/build/classes"/>
+ <fileset dir="../core/lib" includes="*.jar"/>
+ </classpath>
+ </javac>
+ <copy todir="build/classes">
+ <fileset dir="java">
+ <include name="**/*"/>
+ <exclude name="**/*.class"/>
+ <exclude name="**/*.java"/>
+ <exclude name="**/*.form"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="jars" depends="prepare">
+ <copy file="manifest/manifest.txt" tofile="build/manifest.txt">
+ <filterset>
+ <filter token="version" value="${component.release}"/>
+ <filter token="name" value="${component.name}"/>
+ </filterset>
+ </copy>
+ <jar destfile="build/jars/${component.name}.jar" basedir="build/classes" manifest="build/manifest.txt"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="build"/>
+ </target>
+
+ <target name="config" depends="get-configuration,prepare">
+ <property name="component.dir" value="build/config/source/${component.name}/${component.release}"/>
+ <copy file="component-definition-properties.xml" tofile="build/config/source/component-definition-properties.xml"/>
+ <mkdir dir="${component.dir}"/>
+ <copy todir="${component.dir}">
+ <fileset dir="build/jars" includes="*.jar"/>
+ </copy>
+ <antcall target="generate-update"/>
+ </target>
+
+ <target name="setup">
+ <copy todir="../../build/setup/root/lib">
+ <fileset dir="build/jars" includes="*.jar"/>
+ </copy>
+ </target>
+
+ <target name="mk-output-dirs">
+ <mkdir dir="build/classes"/>
+ <mkdir dir="build/jars"/>
+ </target>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="../../defs/technical-component-definition.xsd">
+ <name>auth-noauth</name>
+ <description>Mode d'authentification sans authentification</description>
+ <release>5.0.0.0</release>
+ <url>http://xemelios.org/updatesV5/auth-noauth</url>
+ <type>COMPOSANT</type>
+ <destination>
+ <base>${xemelios.root}/lib</base>
+ </destination>
+
+ <requires>
+ <component-ref url="http://xemelios.org/updatesV5/core" release="5.0.0.0"/>
+ </requires>
+</component>
--- /dev/null
+/*
+ * Copyright
+ * 2010 axYus - http://www.axyus.com
+ * 2010 C.Marchand - christophe.marchand@axyus.com
+ *
+ * This file is part of XEMELIOS_NB.
+ *
+ * XEMELIOS_NB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * XEMELIOS_NB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with XEMELIOS_NB; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+package fr.gouv.finances.dgfip.xemelios.auth.impl.noauth;
+
+import fr.gouv.finances.dgfip.xemelios.auth.AuthEngine;
+import fr.gouv.finances.dgfip.xemelios.auth.XemeliosUser;
+import fr.gouv.finances.dgfip.xemelios.common.config.DocumentModel;
+
+/**
+ * Moteur d'authentification qui ne fait pas d'authentification.
+ * Il ne demande pas de login, et on a tous les droits.
+ * @author cmarchand
+ */
+public class NoAuthEngine implements AuthEngine {
+
+ /**
+ * Crée une nouvelle instance du moteur d'authentification.
+ * Requis par la spécification.
+ */
+ public NoAuthEngine() {
+ super();
+ }
+
+ @Override
+ public boolean isLoginRequired() {
+ return false;
+ }
+
+ @Override
+ public boolean isPasswordRequired() {
+ return false;
+ }
+
+ @Override
+ public XemeliosUser createUser(String login, String password) {
+ return new XemeliosUser() {
+ @Override
+ public String getId() {
+ return "xemelios.anonymous";
+ }
+ @Override
+ public String getDisplayName() {
+ return "Anonyme";
+ }
+ @Override
+ public boolean hasRole(String role) {
+ return true;
+ }
+ @Override
+ public boolean hasDocument(String document) {
+ return true;
+ }
+ @Override
+ public boolean hasCollectivite(String collectivite, DocumentModel dm) {
+ return true;
+ }
+ };
+ }
+
+}
--- /dev/null
+Manifest-version: 1.0
+Jar-Version: @version@
+Jar-Content: @name@
+Main-Class: fr.gouv.finances.dgfip.xemelios.auth.CfgAuth
+