summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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