net.minecraft.server.dedicated.management.network

public class BearerAuthenticationHandler

extends io.netty.channel.ChannelDuplexHandler

net.minecraft.server.jsonrpc.security.AuthenticationHandler
net.minecraft.class_12000
net.minecraft.server.dedicated.management.network.BearerAuthenticationHandler

Field summary

Modifier and TypeField
private final org.slf4j.Logger
LOGGER
field_62832
LOGGER
private static final io.netty.util.AttributeKey<Boolean>
AUTHENTICATED_KEY
field_63006
AUTHENTICATED_KEY
private static final io.netty.util.AttributeKey<Boolean>
ATTR_WEBSOCKET_ALLOWED
field_63671
WEBSOCKET_AUTH_ALLOWED_KEY
private static final String
SUBPROTOCOL_VALUE
field_63672
PROTOCOL
private static final String
SUBPROTOCOL_HEADER_PREFIX
field_63673
PROTOCOL_PREFIX
public static final String
BEARER_PREFIX
field_62831
BEARER_PREFIX
private final BearerToken
securityConfig
field_62833
token
private final Set<String>
allowedOrigins
field_63674
allowedOrigins

Constructor summary

ModifierConstructor
public (BearerToken token, String allowedOrigins)

Method summary

Modifier and TypeMethod
public void
channelRead(io.netty.channel.ChannelHandlerContext context, Object msg)
channelRead(io.netty.channel.ChannelHandlerContext arg0, Object arg1)
channelRead(io.netty.channel.ChannelHandlerContext context, Object object)
public void
write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
write(io.netty.channel.ChannelHandlerContext arg0, Object arg1, io.netty.channel.ChannelPromise arg2)
write(io.netty.channel.ChannelHandlerContext context, Object value, io.netty.channel.ChannelPromise promise)
private BearerAuthenticationHandler$Result
performSecurityChecks(io.netty.handler.codec.http.HttpRequest request)
method_74511(io.netty.handler.codec.http.HttpRequest arg0)
authenticate(io.netty.handler.codec.http.HttpRequest request)
private boolean
isAllowedOriginHeader(io.netty.handler.codec.http.HttpRequest request)
method_75593(io.netty.handler.codec.http.HttpRequest arg0)
isOriginAllowed(io.netty.handler.codec.http.HttpRequest request)
private String
parseTokenInAuthorizationHeader(io.netty.handler.codec.http.HttpRequest request)
method_75594(io.netty.handler.codec.http.HttpRequest arg0)
getBearerToken(io.netty.handler.codec.http.HttpRequest request)
private String
parseTokenInSecWebsocketProtocolHeader(io.netty.handler.codec.http.HttpRequest request)
method_75595(io.netty.handler.codec.http.HttpRequest arg0)
getProtocolToken(io.netty.handler.codec.http.HttpRequest request)
public boolean
isValidApiKey(String suppliedKey)
method_74512(String arg0)
tokenMatches(String requestToken)
private String
getClientIp(io.netty.channel.ChannelHandlerContext context)
method_74508(io.netty.channel.ChannelHandlerContext arg0)
getHostAddress(io.netty.channel.ChannelHandlerContext context)
private void
sendUnauthorizedResponse(io.netty.channel.ChannelHandlerContext context, String reason)
method_74510(io.netty.channel.ChannelHandlerContext arg0, String arg1)
sendUnauthorizedError(io.netty.channel.ChannelHandlerContext context, String message)
private static void
lambda$sendUnauthorizedResponse$0(io.netty.channel.ChannelHandlerContext arg0, io.netty.util.concurrent.Future arg1)
method_74509(io.netty.channel.ChannelHandlerContext arg0, io.netty.util.concurrent.Future arg1)
method_74509(io.netty.channel.ChannelHandlerContext arg0, io.netty.util.concurrent.Future future)