WIP: authentication rework
This commit is contained in:
parent
f04cf02b4e
commit
e2459f7982
2 changed files with 13 additions and 3 deletions
|
@ -84,7 +84,7 @@ def main():
|
|||
client_secret=args.secret,
|
||||
redirect_uri=args.uri
|
||||
)
|
||||
|
||||
|
||||
enabled_addons = set(a.lower() for a in args.add)
|
||||
for addon in addons:
|
||||
if addon.__name__.lower() in enabled_addons:
|
||||
|
|
|
@ -17,6 +17,7 @@ from aiocraft.client import MinecraftClient
|
|||
from aiocraft.util import helpers
|
||||
from aiocraft.mc.packet import Packet
|
||||
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.play.clientbound import PacketKeepAlive
|
||||
from aiocraft.mc.proto.play.serverbound import PacketKeepAlive as PacketKeepAliveResponse
|
||||
|
@ -97,8 +98,17 @@ class Treepuncher(
|
|||
|
||||
_processing : bool
|
||||
|
||||
def __init__(self, name:str, *args, config_file:str=None, notifier:Notifier=None, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
def __init__(
|
||||
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.name = name
|
||||
|
|
Loading…
Reference in a new issue