summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-09-25 06:01:40 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-09-25 06:01:40 +0000
commitac35ed8648ebc70520f1f5104d08e297e4fc4b01 (patch)
treef98bbb81ad6b4f4417b885f14440723b1bd08c28 /sandbox
parent4d1c0a9df577f64e240978520acfdec432f7d5be (diff)
Adding form based auth
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@818729 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml13
-rw-r--r--sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logon.html20
-rw-r--r--sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logonError.html5
3 files changed, 36 insertions, 2 deletions
diff --git a/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml
index 4d635579e7..704c7631b0 100644
--- a/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/WEB-INF/web.xml
@@ -16,11 +16,20 @@
<welcome-file>store.html</welcome-file>
</welcome-file-list>
- <login-config>
+ <!-- login-config>
<auth-method>BASIC</auth-method>
<realm-name>ldap-realm</realm-name>
- </login-config>
+ </login-config-->
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <realm-name>ldap-realm</realm-name>
+ <form-login-config>
+ <form-login-page>/auth/logon.html</form-login-page>
+ <form-error-page>/auth/logonError.html</form-error-page>
+ </form-login-config>
+ </login-config>
+
<security-role>
<description>Application managers</description>
<role-name>manager</role-name>
diff --git a/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logon.html b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logon.html
new file mode 100644
index 0000000000..09191f7010
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logon.html
@@ -0,0 +1,20 @@
+<HTML>
+<H1>Store Authentication</H1>
+<form method="POST" action="j_security_check">
+<table border="0" cellspacing="2" cellpadding="1">
+<tr>
+ <td>Username:</td>
+ <td><input size="12" value="" name="j_username" maxlength="25" type="text"></td>
+</tr>
+<tr>
+ <td>Password:</td>
+ <td><input size="12" value="" name="j_password" maxlength="25" type="password"></td>
+</tr>
+<tr>
+ <td colspan="2" align="center">
+ <input name="submit" type="submit" value="Login">
+ </td>
+</tr>
+</table>
+</form>
+</HTML> \ No newline at end of file
diff --git a/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logonError.html b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logonError.html
new file mode 100644
index 0000000000..c0c0f7b75d
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-secure-webapp/src/main/webapp/auth/logonError.html
@@ -0,0 +1,5 @@
+<HTML>
+<H1>Store Authentication ERROR</H1>
+Username, password or role incorrect.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+</HTML> \ No newline at end of file