net.minecraft.server.jsonrpc.security

public class AuthenticationHandler

extends io.netty.channel.ChannelDuplexHandler

avx
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
b
LOGGER
field_62832
LOGGER
private static final io.netty.util.AttributeKey<Boolean>
c
AUTHENTICATED_KEY
field_63006
AUTHENTICATED_KEY
private static final io.netty.util.AttributeKey<Boolean>
d
ATTR_WEBSOCKET_ALLOWED
field_63671
WEBSOCKET_AUTH_ALLOWED_KEY
private static final String
e
SUBPROTOCOL_VALUE
field_63672
PROTOCOL
private static final String
f
SUBPROTOCOL_HEADER_PREFIX
field_63673
PROTOCOL_PREFIX
public static final String
a
BEARER_PREFIX
field_62831
BEARER_PREFIX
private final SecurityConfig
g
securityConfig
field_62833
token
private final Set<String>
h
allowedOrigins
field_63674
allowedOrigins

Constructor summary

ModifierConstructor
public (SecurityConfig token, String allowedOrigins)

Method summary

Modifier and TypeMethod
public void
channelRead(io.netty.channel.ChannelHandlerContext arg0, Object arg1)
channelRead(io.netty.channel.ChannelHandlerContext arg0, Object arg1)
channelRead(io.netty.channel.ChannelHandlerContext arg0, Object arg1)
channelRead(io.netty.channel.ChannelHandlerContext context, Object object)
public void
write(io.netty.channel.ChannelHandlerContext arg0, Object arg1, io.netty.channel.ChannelPromise arg2)
write(io.netty.channel.ChannelHandlerContext arg0, Object arg1, io.netty.channel.ChannelPromise arg2)
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 AuthenticationHandler$SecurityCheckResult
a(io.netty.handler.codec.http.HttpRequest arg0)
performSecurityChecks(io.netty.handler.codec.http.HttpRequest arg0)
method_74511(io.netty.handler.codec.http.HttpRequest arg0)
authenticate(io.netty.handler.codec.http.HttpRequest request)
private boolean
b(io.netty.handler.codec.http.HttpRequest arg0)
isAllowedOriginHeader(io.netty.handler.codec.http.HttpRequest arg0)
method_75593(io.netty.handler.codec.http.HttpRequest arg0)
isOriginAllowed(io.netty.handler.codec.http.HttpRequest request)
private String
c(io.netty.handler.codec.http.HttpRequest arg0)
parseTokenInAuthorizationHeader(io.netty.handler.codec.http.HttpRequest arg0)
method_75594(io.netty.handler.codec.http.HttpRequest arg0)
getBearerToken(io.netty.handler.codec.http.HttpRequest request)
private String
d(io.netty.handler.codec.http.HttpRequest arg0)
parseTokenInSecWebsocketProtocolHeader(io.netty.handler.codec.http.HttpRequest arg0)
method_75595(io.netty.handler.codec.http.HttpRequest arg0)
getProtocolToken(io.netty.handler.codec.http.HttpRequest request)
public boolean
a(String arg0)
isValidApiKey(String arg0)
method_74512(String arg0)
tokenMatches(String requestToken)
private String
a(io.netty.channel.ChannelHandlerContext arg0)
getClientIp(io.netty.channel.ChannelHandlerContext arg0)
method_74508(io.netty.channel.ChannelHandlerContext arg0)
getHostAddress(io.netty.channel.ChannelHandlerContext context)
private void
a(io.netty.channel.ChannelHandlerContext arg0, String arg1)
sendUnauthorizedResponse(io.netty.channel.ChannelHandlerContext arg0, String arg1)
method_74510(io.netty.channel.ChannelHandlerContext arg0, String arg1)
sendUnauthorizedError(io.netty.channel.ChannelHandlerContext context, String message)