Êþº¾E­;net/minecraft/server/jsonrpc/security/AuthenticationHandler  %io/netty/channel/ChannelDuplexHandler()V  com/mojang/logging/LogUtils getLogger()Lorg/slf4j/Logger;  LOGGERLorg/slf4j/Logger;  securityConfig6Lnet/minecraft/server/jsonrpc/security/SecurityConfig;,  java/lang/Stringsplit'(Ljava/lang/String;)[Ljava/lang/String; !" #$com/google/common/collect/Sets newHashSet(([Ljava/lang/Object;)Ljava/util/HashSet; & '(allowedOriginsLjava/util/Set; * +, getClientIp<(Lio/netty/channel/ChannelHandlerContext;)Ljava/lang/String;.'io/netty/handler/codec/http/HttpRequest 0 12performSecurityChecks|(Lio/netty/handler/codec/http/HttpRequest;)Lnet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult; 456 78Onet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult isAllowed()Z :;< =>&io/netty/channel/ChannelHandlerContextchannel()Lio/netty/channel/Channel; @ ABAUTHENTICATED_KEYLio/netty/util/AttributeKey; DEF GHio/netty/channel/Channelattr7(Lio/netty/util/AttributeKey;)Lio/netty/util/Attribute; JKL MNjava/lang/BooleanvalueOf(Z)Ljava/lang/Boolean; PQR STio/netty/util/Attributeset(Ljava/lang/Object;)V 4V W8!isTokenSentInSecWebsocketProtocol Y ZBATTR_WEBSOCKET_ALLOWED J\ ]^TRUELjava/lang/Boolean;`5Authentication rejected for connection with ip {}: {} 4b cd getReason()Ljava/lang/String; fgh ijorg/slf4j/Loggerdebug9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V l mnsendUnauthorizedResponse=(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/String;)V Pp qrget()Ljava/lang/Object; Jt uvequals(Ljava/lang/Object;)Z x yz channelRead=(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;)V|.Dropping unauthenticated connection with ip {} f~ i'(Ljava/lang/String;Ljava/lang/Object;)V :� ‚ƒclose"()Lio/netty/channel/ChannelFuture;…(io/netty/handler/codec/http/HttpResponse „‡ ˆ‰status2()Lio/netty/handler/codec/http/HttpResponseStatus; ‹Œ� Ž�.io/netty/handler/codec/http/HttpResponseStatuscode()I ‹‘ ’“SWITCHING_PROTOCOLS0Lio/netty/handler/codec/http/HttpResponseStatus; „• –—headers+()Lio/netty/handler/codec/http/HttpHeaders; ™š› œ�+io/netty/handler/codec/http/HttpHeaderNamesSEC_WEBSOCKET_PROTOCOLLio/netty/util/AsciiString;Ÿ minecraft-v1 ¡¢£ S¤'io/netty/handler/codec/http/HttpHeadersU(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders; ¦ §¨write^(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Lio/netty/channel/ChannelPromise;)V ª «¬parseTokenInAuthorizationHeader=(Lio/netty/handler/codec/http/HttpRequest;)Ljava/lang/String; ® ¯° isValidApiKey(Ljava/lang/String;)Z 4² ³´allowedS()Lnet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult;¶Invalid API key 4¸ ¹ºdeniede(Ljava/lang/String;)Lnet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult; ¼ ½¬&parseTokenInSecWebsocketProtocolHeader ¿ ÀÁisAllowedOriginHeader,(Lio/netty/handler/codec/http/HttpRequest;)ZÃOrigin Not Allowed 4Å ³ÆT(Z)Lnet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult;ÈMissing API key -• ™Ë Ì�ORIGIN ¡Î qÏ,(Ljava/lang/CharSequence;)Ljava/lang/String; Ñ Ò8isEmpty ÔÕÖ ×v java/util/Setcontains ™Ù Ú� AUTHORIZATIONÜBearer Þ ß° startsWith á â�length ä åæ substring(I)Ljava/lang/String; è édtrimë minecraft-v1, íîï ðñ!java/nio/charset/StandardCharsetsUTF_8Ljava/nio/charset/Charset; ó ôõgetBytes(Ljava/nio/charset/Charset;)[B ÷øù úd4net/minecraft/server/jsonrpc/security/SecurityConfig secretKey üýþ ÿjava/security/MessageDigestisEqual([B[B)Z D  remoteAddress()Ljava/net/SocketAddress;java/net/InetSocketAddress     getAddress()Ljava/net/InetAddress;    djava/net/InetAddressgetHostAddress makeConcatWithConstants&(Ljava/lang/String;)Ljava/lang/String;3io/netty/handler/codec/http/DefaultFullHttpResponse  'io/netty/handler/codec/http/HttpVersionHTTP_1_1)Lio/netty/handler/codec/http/HttpVersion; ‹ “ UNAUTHORIZED  !" #$io/netty/buffer/Unpooled wrappedBuffer([B)Lio/netty/buffer/ByteBuf; & 'u(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpResponseStatus;Lio/netty/buffer/ByteBuf;)V • ™* +� CONTENT_TYPE-application/json ™/ 0�CONTENT_LENGTH 234 M5java/lang/Integer(I)Ljava/lang/Integer; ™7 8� CONNECTION‚ :; <= writeAndFlush4(Ljava/lang/Object;)Lio/netty/channel/ChannelFuture;? @AoperationCompleteZ(Lio/netty/channel/ChannelHandlerContext;)Lio/netty/util/concurrent/GenericFutureListener; CDE FGio/netty/channel/ChannelFuture addListenerR(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;I authenticated KLM MNio/netty/util/AttributeKey0(Ljava/lang/String;)Lio/netty/util/AttributeKey;Pwebsocket_auth_allowed Signature1Lio/netty/util/AttributeKey;SUBPROTOCOL_VALUELjava/lang/String; ConstantValueSUBPROTOCOL_HEADER_PREFIX BEARER_PREFIX#Ljava/util/Set;K(Lnet/minecraft/server/jsonrpc/security/SecurityConfig;Ljava/lang/String;)VCodeLineNumberTableLocalVariableTablethis=Lnet/minecraft/server/jsonrpc/security/AuthenticationHandler;MethodParametersresultQLnet/minecraft/server/jsonrpc/security/AuthenticationHandler$SecurityCheckResult;request)Lio/netty/handler/codec/http/HttpRequest;context(Lio/netty/channel/ChannelHandlerContext;msgLjava/lang/Object;clientIpisAuthenticated StackMapTable Exceptionsmjava/lang/Exceptionresponse*Lio/netty/handler/codec/http/HttpResponse;ctxpromise!Lio/netty/channel/ChannelPromise;tokenInAuthorizationHeader!tokenInSecWebsocketProtocolHeader originHeader authHeaderRuntimeVisibleTypeAnnotations#Lorg/jspecify/annotations/Nullable; suppliedKeysuppliedKeyBytes[BconfiguredKeyBytesLjava/net/InetSocketAddress;reason responseBodycontent5Lio/netty/handler/codec/http/DefaultFullHttpResponse;!lambda$sendUnauthorizedResponse$0L(Lio/netty/channel/ChannelHandlerContext;Lio/netty/util/concurrent/Future;)Vfuture!Lio/netty/util/concurrent/Future; SourceFileAuthenticationHandler.javaRuntimeVisibleAnnotations*Lio/netty/channel/ChannelHandler$Sharable; NestMembersBootstrapMethodsŽ&{"error":"Unauthorized","message":""}�$(Lio/netty/util/concurrent/Future;)V’ “ ‚ƒ• –—˜ ™$java/lang/invoke/StringConcatFactory˜(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;› œ�ž Ÿ "java/lang/invoke/LambdaMetafactory metafactoryÌ(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; InnerClassesSecurityCheckResult¤(io/netty/channel/ChannelHandler$Sharable¦io/netty/channel/ChannelHandlerSharable©%java/lang/invoke/MethodHandles$Lookup«java/lang/invoke/MethodHandlesLookup!ABQRZBQRSTUžVTUêWTUÛ'(QX YZl*·*¸ µ*+µ*,¶¸µ%±[$ %&'\ ]^'T_ 'yzZ’Î*+¶)N,Á-™„,À-:*¶/:¶3™;+¹9²?¹C¸I¹O¶U™O+¹9²X¹C²[¹O§6*´_-¶a¹e+¹9²?¹C¸I¹O*+¶a¶k±+¹9²?¹C¹oÀJ:²[¶s™ *+,·w§*´{-¹}+¹€W±[F+,-/#0:1B2[5l6ƒ7�8Ž<¦>±?ºAÆBÍD\Hs`a{bcÎ]^ÎdeÎfgÈhT¦(i^jþ[-4ù2ü+Jkl_ df§¨ZÚm,Á„™a,À„:¹†¶Š²�¶Š H+¹9²X¹C¹oÆ2+¹9²X¹C¹oÀJ²[¶s™¹”²˜ž¶ W*+,-·¥±[H IUJeMlN\4 Xnom]^mpemfgmqrjûekl_ pfq12ZÜM*+¶©M,Æ*,¶­™¸±°µ¸·°*+¶»N-Æ$*+¶¾š ¸·°*-¶­™¸Ä°µ¸·°Ǹ·°[6 QR STVY"Z&[.\4_<`AbGf\*M]^MbcGsT"+tTjüü _bÀÁZ~%+¹É²Ê¶ÍM,Æ ,¶Ð™¬*´%,¹Ó¬[j lmp\ %]^%bc uTj ü_b«¬Z�)+¹É²Ø¶ÍM,Æ,Û¶Ý™,Û¶à¶ã¶ç°°[t vw'z\ )]^)bc vTjü'_bwx½¬Z�)+¹É²˜¶ÍM,Æ,ê¶Ý™,ê¶à¶ã¶ç°°[~ €�'„\ )]^)bc vTjü'_bwx¯°Z†%+¶Ð™¬+²ì¶òM*´¶ö²ì¶òN,-¸û¬[ˆ‰ Œ��\*%]^%yTz{|{j _y+,ZY+¹9¹ÀM,¶¶ °[ ”•\ ]^de}_dmnZåi,ºN-²ì¶ò:»Y²²¸·%:¶(²),¶ W¶(².¾¸1¶ W¶(²69¶ W+¹:+º>¹BW±[& ™šœŸ$¢3£E¤T¦h§\>i]^idei~TbTY€{$En�_ d~ ‚ƒZ<*¹€W±[¦\de„…kl†Z/H¸J³?O¸J³X±[  ‡ˆ‰Š‹4Œ”�š�‘�¡4¢ £¥§& ¨ª¬