From 8dd06894207789f763374a128584af13a82dee49 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Sun, 23 May 2021 23:04:18 +0200 Subject: [PATCH] Add keyring authentication to ILIAS CLI --- PFERD/cli/command_kit_ilias_web.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PFERD/cli/command_kit_ilias_web.py b/PFERD/cli/command_kit_ilias_web.py index e98f192..e47bc77 100644 --- a/PFERD/cli/command_kit_ilias_web.py +++ b/PFERD/cli/command_kit_ilias_web.py @@ -36,6 +36,11 @@ GROUP.add_argument( metavar="USER_NAME", help="user name for authentication" ) +GROUP.add_argument( + "--keyring", + action=BooleanOptionalAction, + help="use the system keyring to store and retrieve passwords" +) GROUP.add_argument( "--link-file-redirect-delay", type=int, @@ -70,7 +75,11 @@ def load( parser["auth:kit-ilias-web"] = {} auth_section = parser["auth:kit-ilias-web"] - auth_section["type"] = "simple" + + if args.keyring: + auth_section["type"] = "keyring" + else: + auth_section["type"] = "simple" if args.username is not None: auth_section["username"] = str(args.username)