Fix 2
This commit is contained in:
parent
370227497f
commit
d08dd3777a
1 changed files with 2 additions and 2 deletions
|
@ -27,10 +27,10 @@ public class MyHttpAuthenticationMechanism implements HttpAuthenticationMechanis
|
|||
@Override
|
||||
public Uni<SecurityIdentity> authenticate(RoutingContext context, IdentityProviderManager identityProviderManager) {
|
||||
return Uni.createFrom().item((Supplier<SecurityIdentity>) () -> {
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue