Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse McConnell2012-08-23 17:44:30 -0400
committerJesse McConnell2012-08-23 17:44:30 -0400
commitfd1ab0ed55fb0596077c6d34e9afa60487e07beb (patch)
tree44e90ecff091cea66d33911b15f33fae09362096 /jetty-security
parent8e9bcf48f2b81a13734e96fad7c7cf5571289f00 (diff)
parent18cd5b455f44c3dee3fd9a0f72c78f475d4ed909 (diff)
downloadorg.eclipse.jetty.project-fd1ab0ed55fb0596077c6d34e9afa60487e07beb.tar.gz
org.eclipse.jetty.project-fd1ab0ed55fb0596077c6d34e9afa60487e07beb.tar.xz
org.eclipse.jetty.project-fd1ab0ed55fb0596077c6d34e9afa60487e07beb.zip
merge from master
Diffstat (limited to 'jetty-security')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
index 6bfae412fb..ccb00a200d 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
@@ -216,19 +216,20 @@ public class FormAuthenticator extends LoginAuthenticator
synchronized(session)
{
nuri = (String) session.getAttribute(__J_URI);
- }
-
- if (nuri == null || nuri.length() == 0)
- {
- nuri = request.getContextPath();
- if (nuri.length() == 0)
- nuri = URIUtil.SLASH;
+
+ if (nuri == null || nuri.length() == 0)
+ {
+ nuri = request.getContextPath();
+ if (nuri.length() == 0)
+ nuri = URIUtil.SLASH;
+ }
+
+ Authentication cached=new SessionAuthentication(getAuthMethod(),user,password);
+ session.setAttribute(SessionAuthentication.__J_AUTHENTICATED, cached);
}
response.setContentLength(0);
response.sendRedirect(response.encodeRedirectURL(nuri));
-
- Authentication cached=new SessionAuthentication(getAuthMethod(),user,password);
- session.setAttribute(SessionAuthentication.__J_AUTHENTICATED, cached);
+
return new FormAuthentication(getAuthMethod(),user);
}

Back to the top