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 da34f2d6337..538533c6581 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 && _realmName!=null) + if (_identityService==null && _loginService!=null) _identityService=new DefaultIdentityService(); }