From 9b333978271b89d0af7ce51c4015586a424c68a6 Mon Sep 17 00:00:00 2001 From: Romuald Juchnowicz-Bierbasz Date: Tue, 12 Mar 2019 16:53:57 +0100 Subject: [PATCH] Add NextStep and pass_login_credentials --- galaxy/api/plugin.py | 4 ++++ galaxy/api/types.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/galaxy/api/plugin.py b/galaxy/api/plugin.py index eaf8678..9370b4d 100644 --- a/galaxy/api/plugin.py +++ b/galaxy/api/plugin.py @@ -49,6 +49,7 @@ class Plugin(): # implemented by developer self._register_method("init_authentication", self.authenticate, sensitive_params=["stored_credentials"]) + self._register_method("pass_login_credentials", self.pass_login_credentials) self._register_method( "import_owned_games", self.get_owned_games, @@ -274,6 +275,9 @@ class Plugin(): """ raise NotImplementedError() + async def pass_login_credentials(self, step, credentials, cookies): + raise NotImplementedError() + async def get_owned_games(self): raise NotImplementedError() diff --git a/galaxy/api/types.py b/galaxy/api/types.py index 20827da..ea835e0 100644 --- a/galaxy/api/types.py +++ b/galaxy/api/types.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import List, Optional +from typing import List, Dict, Optional from galaxy.api.consts import LicenseType, LocalGameState, PresenceState @@ -8,6 +8,11 @@ class Authentication(): user_id: str user_name: str +@dataclass +class NextStep(): + next_step: str + auth_params: Dict[str, str] + @dataclass class LicenseInfo(): license_type: LicenseType