Class AuthenticationHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
net.minecraft.server.jsonrpc.security.AuthenticationHandler
- All Implemented Interfaces:
 io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
@Sharable
public class AuthenticationHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static final io.netty.util.AttributeKey<Boolean> static final Stringprivate final org.slf4j.Loggerprivate final SecurityConfig - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidchannelRead(io.netty.channel.ChannelHandlerContext pContext, Object pRequest) private StringgetClientIp(io.netty.channel.ChannelHandlerContext pContext) booleanisValidApiKey(String pApiKey) performSecurityChecks(io.netty.handler.codec.http.HttpRequest pRequest) private voidsendUnauthorizedResponse(io.netty.channel.ChannelHandlerContext pContext, String pMessage) private booleanvalidateAuthentication(io.netty.handler.codec.http.HttpRequest pRequest) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved 
- 
Field Details
- 
LOGGER
private final org.slf4j.Logger LOGGER - 
AUTHENTICATED_KEY
 - 
AUTH_HEADER
- See Also:
 
 - 
BEARER_PREFIX
- See Also:
 
 - 
securityConfig
 
 - 
 - 
Constructor Details
- 
AuthenticationHandler
 
 - 
 - 
Method Details
- 
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext pContext, Object pRequest) throws Exception - Specified by:
 channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
 channelReadin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
 Exception
 - 
performSecurityChecks
private AuthenticationHandler.SecurityCheckResult performSecurityChecks(io.netty.handler.codec.http.HttpRequest pRequest)  - 
validateAuthentication
private boolean validateAuthentication(io.netty.handler.codec.http.HttpRequest pRequest)  - 
isValidApiKey
 - 
getClientIp
 - 
sendUnauthorizedResponse
private void sendUnauthorizedResponse(io.netty.channel.ChannelHandlerContext pContext, String pMessage)  
 -