fix bug in SecurityHandler and remove EE10 FormAuthenticator
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
9208629e95
commit
1b6b8331fa
|
@ -600,7 +600,7 @@ public abstract class SecurityHandler extends Handler.Wrapper implements Configu
|
|||
return switch (constraint.getAuthorization())
|
||||
{
|
||||
case FORBIDDEN, ALLOWED, INHERIT -> true;
|
||||
case ANY_USER -> userIdentity == null || userIdentity.getUserPrincipal() == null;
|
||||
case ANY_USER -> userIdentity != null && userIdentity.getUserPrincipal() != null;
|
||||
case KNOWN_ROLE ->
|
||||
{
|
||||
if (userIdentity != null && userIdentity.getUserPrincipal() != null)
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
|
||||
// which is available at https://www.apache.org/licenses/LICENSE-2.0.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.ee10.servlet.security;
|
||||
|
||||
public class FormAuthenticator extends org.eclipse.jetty.security.authentication.FormAuthenticator
|
||||
{
|
||||
public FormAuthenticator()
|
||||
{
|
||||
}
|
||||
|
||||
public FormAuthenticator(String login, String error, boolean dispatch)
|
||||
{
|
||||
super(login, error, dispatch);
|
||||
}
|
||||
}
|
|
@ -24,6 +24,7 @@ import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
|
|||
import org.eclipse.jetty.security.Constraint;
|
||||
import org.eclipse.jetty.security.EmptyLoginService;
|
||||
import org.eclipse.jetty.security.SecurityHandler;
|
||||
import org.eclipse.jetty.security.authentication.FormAuthenticator;
|
||||
import org.eclipse.jetty.server.LocalConnector;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.util.URIUtil;
|
||||
|
|
Loading…
Reference in New Issue