diff options
Diffstat (limited to '')
-rw-r--r-- | sjdbmk/grant.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sjdbmk/grant.py b/sjdbmk/grant.py index d55d9d6..08d1036 100644 --- a/sjdbmk/grant.py +++ b/sjdbmk/grant.py @@ -28,9 +28,7 @@ import msal # type: ignore # logging.getLogger("msal").setLevel(logging.INFO) -def acquire_token_interactive( - app: msal.PublicClientApplication, config: ConfigParser -) -> str: +def acquire_token_interactive(app: msal.PublicClientApplication, config: ConfigParser) -> str: result = app.acquire_token_interactive( config["credentials"]["scope"].split(" "), login_hint=config["credentials"]["username"], @@ -39,14 +37,10 @@ def acquire_token_interactive( if "access_token" in result: assert isinstance(result["access_token"], str) return result["access_token"] - raise ValueError( - "Authentication error while trying to interactively acquire a token" - ) + raise ValueError("Authentication error while trying to interactively acquire a token") -def test_login( - app: msal.PublicClientApplication, config: ConfigParser -) -> dict[str, Any]: +def test_login(app: msal.PublicClientApplication, config: ConfigParser) -> dict[str, Any]: result = app.acquire_token_by_username_password( config["credentials"]["username"], config["credentials"]["password"], |