Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2012-05-22 11:13:10 +0000
committerJan Bartel2012-05-22 11:13:10 +0000
commit37bce89b8ffbd426fefdfa4add2a665c98bfac7f (patch)
treee1387cbb16ed4ff5fcfe7c53816f9413f09cf11a /test-jetty-webapp
parent5420009f0f2bbdb4dcc1cdfe31c29b0a54a6c007 (diff)
downloadorg.eclipse.jetty.project-37bce89b8ffbd426fefdfa4add2a665c98bfac7f.tar.gz
org.eclipse.jetty.project-37bce89b8ffbd426fefdfa4add2a665c98bfac7f.tar.xz
org.eclipse.jetty.project-37bce89b8ffbd426fefdfa4add2a665c98bfac7f.zip
379909 FormAuthenticator Rembers only the URL of first Request before authentication
Diffstat (limited to 'test-jetty-webapp')
-rw-r--r--test-jetty-webapp/src/main/config/contexts/test.xml5
-rw-r--r--test-jetty-webapp/src/main/webapp/WEB-INF/web.xml10
-rw-r--r--test-jetty-webapp/src/main/webapp/auth.html1
-rw-r--r--test-jetty-webapp/src/main/webapp/auth2/index.html6
4 files changed, 22 insertions, 0 deletions
diff --git a/test-jetty-webapp/src/main/config/contexts/test.xml b/test-jetty-webapp/src/main/config/contexts/test.xml
index 3c36173b13..32e5b40584 100644
--- a/test-jetty-webapp/src/main/config/contexts/test.xml
+++ b/test-jetty-webapp/src/main/config/contexts/test.xml
@@ -61,6 +61,11 @@ detected.
-->
</New>
</Set>
+ <Set name="authenticator">
+ <New class="org.eclipse.jetty.security.authentication.FormAuthenticator">
+ <Set name="alwaysSaveUri">true</Set>
+ </New>
+ </Set>
<Set name="checkWelcomeFiles">true</Set>
</Get>
diff --git a/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml b/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml
index 0c633bd765..f995d0162d 100644
--- a/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml
@@ -268,6 +268,16 @@
<security-constraint>
<web-resource-collection>
+ <web-resource-name>Auth2</web-resource-name>
+ <url-pattern>/auth2/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <security-constraint>
+ <web-resource-collection>
<web-resource-name>Any User</web-resource-name>
<url-pattern>/dump/auth/*</url-pattern>
<url-pattern>*.htm</url-pattern>
diff --git a/test-jetty-webapp/src/main/webapp/auth.html b/test-jetty-webapp/src/main/webapp/auth.html
index 1f64b2bc67..1b1de1157c 100644
--- a/test-jetty-webapp/src/main/webapp/auth.html
+++ b/test-jetty-webapp/src/main/webapp/auth.html
@@ -12,6 +12,7 @@ This page contains several links to test the authentication constraints:
<ul>
<li><a href="auth/file.txt">auth/file.txt</a> - Forbidden</li>
<li><a href="auth/relax.txt">auth/relax.txt</a> - Allowed</li>
+<li><a href="auth2">auth2/index.html</a> - Authenticated (tests FormAuthenticator.setAlwaysSaveUri()) </li>
<li><a href="dump/auth/noaccess/info">dump/auth/noaccess/*</a> - Forbidden</li>
<li><a href="dump/auth/relax/info">dump/auth/relax/*</a> - Allowed</li>
<li><a href="dump/auth/info">dump/auth/*</a> - Authenticated any user</li>
diff --git a/test-jetty-webapp/src/main/webapp/auth2/index.html b/test-jetty-webapp/src/main/webapp/auth2/index.html
new file mode 100644
index 0000000000..f46164c410
--- /dev/null
+++ b/test-jetty-webapp/src/main/webapp/auth2/index.html
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <h1>YAY!</h1>
+ <p>You have successfully authenticated. You can use this url in conjunction with any of the other urls that lead to a login form to test which urls are saved on entry to the login form.</p>
+ </body>
+</html>

Back to the top