Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-01-26 16:39:11 -0500
committerGreg Wilkins2012-01-26 16:39:11 -0500
commitce2dd8e30ec8199e8f1adbe5dd511f0e83cae244 (patch)
treed23e8b73e342d5a5cf4002de122d27475c62d1a3 /jetty-security/src/main
parent7ac9eb585f7a540cb4e17aa9b07bb7b95a47144c (diff)
downloadorg.eclipse.jetty.project-ce2dd8e30ec8199e8f1adbe5dd511f0e83cae244.tar.gz
org.eclipse.jetty.project-ce2dd8e30ec8199e8f1adbe5dd511f0e83cae244.tar.xz
org.eclipse.jetty.project-ce2dd8e30ec8199e8f1adbe5dd511f0e83cae244.zip
368773 allow authentication to be set by non securityHandler handlers
Diffstat (limited to 'jetty-security/src/main')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
index 538533c658..f6af097880 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
@@ -306,7 +306,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
if (_identityService==null)
_identityService=findIdentityService();
- if (_identityService==null && _loginService!=null)
+ if (_identityService==null && _realmName!=null)
_identityService=new DefaultIdentityService();
}
@@ -469,7 +469,8 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
{
Authentication.User userAuth = (Authentication.User)authentication;
baseRequest.setAuthentication(authentication);
- previousIdentity = _identityService.associate(userAuth.getUserIdentity());
+ if (_identityService!=null)
+ previousIdentity = _identityService.associate(userAuth.getUserIdentity());
if (isAuthMandatory)
{
@@ -483,7 +484,8 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
}
handler.handle(pathInContext, baseRequest, request, response);
- authenticator.secureResponse(request, response, isAuthMandatory, userAuth);
+ if (authenticator!=null)
+ authenticator.secureResponse(request, response, isAuthMandatory, userAuth);
}
else if (authentication instanceof Authentication.Deferred)
{

Back to the top