diff --git a/build.gradle.kts b/build.gradle.kts index b7d07f0..b200a99 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,9 +36,9 @@ dependencies { implementation("dev.plex:server:1.5-SNAPSHOT") implementation("org.json:json:20240303") implementation("org.reflections:reflections:0.10.2") - implementation("org.eclipse.jetty:jetty-server:11.0.24") - implementation("org.eclipse.jetty:jetty-servlet:11.0.24") - implementation("org.eclipse.jetty:jetty-proxy:11.0.24") + implementation("org.eclipse.jetty:jetty-server:12.0.14") + implementation("org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.14") + implementation("org.eclipse.jetty:jetty-proxy:12.0.14") implementation("com.github.MilkBowl:VaultAPI:1.7.1") { exclude("org.bukkit", "bukkit") } diff --git a/src/main/java/dev/plex/HTTPDModule.java b/src/main/java/dev/plex/HTTPDModule.java index 2862830..ba20cb4 100644 --- a/src/main/java/dev/plex/HTTPDModule.java +++ b/src/main/java/dev/plex/HTTPDModule.java @@ -13,10 +13,10 @@ import lombok.Getter; import net.milkbowl.vault.permission.Permission; import org.bukkit.Bukkit; import org.bukkit.plugin.RegisteredServiceProvider; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.server.*; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHandler; -import org.eclipse.jetty.servlet.ServletHolder; import java.io.File; import java.util.concurrent.atomic.AtomicReference; @@ -71,7 +71,9 @@ public class HTTPDModule extends PlexModule Server server = new Server(); ServletHandler servletHandler = new ServletHandler(); - context = new ServletContextHandler(servletHandler, "/", ServletContextHandler.SESSIONS); + context = new ServletContextHandler(ServletContextHandler.SESSIONS); + context.setHandler(servletHandler); + context.setContextPath("/"); HttpConfiguration configuration = new HttpConfiguration(); configuration.addCustomizer(new ForwardedRequestCustomizer()); HttpConnectionFactory factory = new HttpConnectionFactory(configuration); diff --git a/src/main/java/dev/plex/authentication/AuthenticatedUser.java b/src/main/java/dev/plex/authentication/AuthenticatedUser.java index 494dbd5..4956592 100644 --- a/src/main/java/dev/plex/authentication/AuthenticatedUser.java +++ b/src/main/java/dev/plex/authentication/AuthenticatedUser.java @@ -6,12 +6,6 @@ import lombok.experimental.Accessors; import java.time.ZonedDateTime; import java.util.LinkedList; -import java.util.List; - -/** - * @author Taah - * @since 6:37 PM [03-05-2024] - */ @Data @Accessors(fluent = true) diff --git a/src/main/java/dev/plex/authentication/AuthenticationManager.java b/src/main/java/dev/plex/authentication/AuthenticationManager.java index ef08eb6..68a0756 100644 --- a/src/main/java/dev/plex/authentication/AuthenticationManager.java +++ b/src/main/java/dev/plex/authentication/AuthenticationManager.java @@ -5,10 +5,6 @@ import dev.plex.authentication.impl.DiscordOAuth2Provider; import dev.plex.util.PlexLog; import org.apache.commons.lang3.NotImplementedException; -/** - * @author Taah - * @since 7:08 PM [03-05-2024] - */ public class AuthenticationManager { private final OAuth2Provider provider; diff --git a/src/main/java/dev/plex/authentication/OAuth2Provider.java b/src/main/java/dev/plex/authentication/OAuth2Provider.java index 7f98a75..5267357 100644 --- a/src/main/java/dev/plex/authentication/OAuth2Provider.java +++ b/src/main/java/dev/plex/authentication/OAuth2Provider.java @@ -4,10 +4,6 @@ import org.eclipse.jetty.server.Response; import java.util.HashMap; -/** - * @author Taah - * @since 6:36 PM [03-05-2024] - */ public interface OAuth2Provider { HashMap sessions(); diff --git a/src/main/java/dev/plex/authentication/UserType.java b/src/main/java/dev/plex/authentication/UserType.java index 7cb821e..d41ad29 100644 --- a/src/main/java/dev/plex/authentication/UserType.java +++ b/src/main/java/dev/plex/authentication/UserType.java @@ -1,9 +1,5 @@ package dev.plex.authentication; -/** - * @author Taah - * @since 6:37 PM [03-05-2024] - */ public enum UserType { DISCORD, UNKNOWN diff --git a/src/main/java/dev/plex/authentication/impl/DiscordOAuth2Provider.java b/src/main/java/dev/plex/authentication/impl/DiscordOAuth2Provider.java index b5c2397..67cb09e 100644 --- a/src/main/java/dev/plex/authentication/impl/DiscordOAuth2Provider.java +++ b/src/main/java/dev/plex/authentication/impl/DiscordOAuth2Provider.java @@ -13,10 +13,6 @@ import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.HashMap; -/** - * @author Taah - * @since 6:41 PM [03-05-2024] - */ public class DiscordOAuth2Provider implements OAuth2Provider { private final HashMap sessions = Maps.newHashMap(); diff --git a/src/main/java/dev/plex/request/AbstractServlet.java b/src/main/java/dev/plex/request/AbstractServlet.java index 34951b3..7294ca5 100644 --- a/src/main/java/dev/plex/request/AbstractServlet.java +++ b/src/main/java/dev/plex/request/AbstractServlet.java @@ -18,7 +18,7 @@ import java.text.StringCharacterIterator; import java.util.List; import java.util.Objects; import lombok.Data; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletHolder; public class AbstractServlet extends HttpServlet {