WIP: authentication rework
This commit is contained in:
parent
f04cf02b4e
commit
e2459f7982
2 changed files with 13 additions and 3 deletions
|
@ -17,6 +17,7 @@ from aiocraft.client import MinecraftClient
|
||||||
from aiocraft.util import helpers
|
from aiocraft.util import helpers
|
||||||
from aiocraft.mc.packet import Packet
|
from aiocraft.mc.packet import Packet
|
||||||
from aiocraft.mc.definitions import ConnectionState
|
from aiocraft.mc.definitions import ConnectionState
|
||||||
|
from aiocraft.mc.auth import AuthInterface, MicrosoftAuthenticator, MojangAuthenticator
|
||||||
from aiocraft.mc.proto import PacketSetCompression, PacketKickDisconnect
|
from aiocraft.mc.proto import PacketSetCompression, PacketKickDisconnect
|
||||||
from aiocraft.mc.proto.play.clientbound import PacketKeepAlive
|
from aiocraft.mc.proto.play.clientbound import PacketKeepAlive
|
||||||
from aiocraft.mc.proto.play.serverbound import PacketKeepAlive as PacketKeepAliveResponse
|
from aiocraft.mc.proto.play.serverbound import PacketKeepAlive as PacketKeepAliveResponse
|
||||||
|
@ -97,8 +98,17 @@ class Treepuncher(
|
||||||
|
|
||||||
_processing : bool
|
_processing : bool
|
||||||
|
|
||||||
def __init__(self, name:str, *args, config_file:str=None, notifier:Notifier=None, **kwargs):
|
def __init__(
|
||||||
super().__init__(*args, **kwargs)
|
self,
|
||||||
|
name:str,
|
||||||
|
server:str,
|
||||||
|
config_file:str=None,
|
||||||
|
notifier:Notifier=None,
|
||||||
|
online_mode:bool=True,
|
||||||
|
authenticator:Optional[AuthInterface]=None,
|
||||||
|
**kwargs
|
||||||
|
):
|
||||||
|
super().__init__(server, online_mode=online_mode, authenticator=authenticator, username=name)
|
||||||
self.ctx = dict()
|
self.ctx = dict()
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
Loading…
Reference in a new issue