From d08dd3777ab823576117267d690f89bcf2f9b6d4 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sun, 8 Dec 2024 12:46:31 +0100 Subject: [PATCH] Fix 2 --- .../eu/m724/mstats/auth/MyHttpAuthenticationMechanism.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/m724/mstats/auth/MyHttpAuthenticationMechanism.java b/src/main/java/eu/m724/mstats/auth/MyHttpAuthenticationMechanism.java index cf38b60..ff2dd2a 100644 --- a/src/main/java/eu/m724/mstats/auth/MyHttpAuthenticationMechanism.java +++ b/src/main/java/eu/m724/mstats/auth/MyHttpAuthenticationMechanism.java @@ -27,10 +27,10 @@ public class MyHttpAuthenticationMechanism implements HttpAuthenticationMechanis @Override public Uni authenticate(RoutingContext context, IdentityProviderManager identityProviderManager) { return Uni.createFrom().item((Supplier) () -> { - String serverTokenEncoded = context.request().getHeader("Server-Token"); + String serverTokenEncoded = context.request().getHeader("X-Server-Token"); if (serverTokenEncoded != null) { - if (serverTokenEncoded.equals("iAdmin")) { + if (serverTokenEncoded.equals("secure admni token")) { return QuarkusSecurityIdentity.builder() .setPrincipal(new QuarkusPrincipal("Administrator")) .addRole("admin")