FELIX-3981 Create a sample project for demonstrating Felix JAAS main features

Adding a LoginModuleFactory based example which uses an embedded DataBase (H2) to perform user authentication

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1461132 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/examples/jaas/launcher/src/main/bundles/list.xml b/examples/jaas/launcher/src/main/bundles/list.xml
index 35d6d3e..649ef91 100644
--- a/examples/jaas/launcher/src/main/bundles/list.xml
+++ b/examples/jaas/launcher/src/main/bundles/list.xml
@@ -52,6 +52,16 @@
       <artifactId>org.apache.felix.example.jaas.lm-config</artifactId>
       <version>${jaas.example.version}</version>
     </bundle>
+    <bundle>
+      <groupId>org.apache.felix.example</groupId>
+      <artifactId>org.apache.felix.example.jaas.lm-jdbc</artifactId>
+      <version>${jaas.example.version}</version>
+    </bundle>
+    <bundle>
+      <groupId>org.apache.felix.example</groupId>
+      <artifactId>org.apache.felix.example.jaas.jdbc-h2</artifactId>
+      <version>${jaas.example.version}</version>
+    </bundle>
 
     <!-- Bundles lrequired for Sling Installer Support -->
     <bundle>
diff --git a/examples/jaas/launcher/src/main/config/org.apache.felix.example.jaas.jdbc.factory-h2.cfg b/examples/jaas/launcher/src/main/config/org.apache.felix.example.jaas.jdbc.factory-h2.cfg
new file mode 100644
index 0000000..e0e8980
--- /dev/null
+++ b/examples/jaas/launcher/src/main/config/org.apache.felix.example.jaas.jdbc.factory-h2.cfg
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+jaas.realmName=sample
+jaas.controlFlag=sufficient
+
+datasourceName=test
diff --git a/examples/jaas/launcher/src/main/config/org.apache.felix.jaas.Configuration.factory-simple.cfg b/examples/jaas/launcher/src/main/config/org.apache.felix.jaas.Configuration.factory-simple.cfg
index 6e19a73..055c554 100644
--- a/examples/jaas/launcher/src/main/config/org.apache.felix.jaas.Configuration.factory-simple.cfg
+++ b/examples/jaas/launcher/src/main/config/org.apache.felix.jaas.Configuration.factory-simple.cfg
@@ -18,6 +18,6 @@
 #
 
 jaas.classname=org.apache.felix.example.jaas.config.internal.SampleConfigLoginModule
-jaas.controlFlag=required
+jaas.controlFlag=sufficient
 jaas.ranking=0
 jaas.realmName=sample
diff --git a/examples/jaas/launcher/src/main/sling/common.properties b/examples/jaas/launcher/src/main/sling/common.properties
index 9c59295..4e2d212 100644
--- a/examples/jaas/launcher/src/main/sling/common.properties
+++ b/examples/jaas/launcher/src/main/sling/common.properties
@@ -16,6 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-
+# suppress inspection "UnusedProperty" for whole file
 sling.bootdelegation.class.org.apache.felix.jaas.boot.ProxyLoginModule = \
-   org.apache.felix.jaas.boot
\ No newline at end of file
+   org.apache.felix.jaas.boot
+sling.home = jaas-sample