mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Use system keyring service for password auth
This commit is contained in:
@ -2,7 +2,8 @@
|
||||
Synchronizing files from ILIAS instances (https://www.ilias.de/).
|
||||
"""
|
||||
|
||||
from .authenticators import IliasAuthenticator, KitShibbolethAuthenticator
|
||||
from .authenticators import (IliasAuthenticator, KitShibbolethAuthenticator,
|
||||
KeyringKitShibbolethAuthenticator)
|
||||
from .crawler import (IliasCrawler, IliasCrawlerEntry, IliasDirectoryFilter,
|
||||
IliasElementType)
|
||||
from .downloader import (IliasDownloader, IliasDownloadInfo,
|
||||
|
@ -37,8 +37,12 @@ class KitShibbolethAuthenticator(IliasAuthenticator):
|
||||
Authenticate via KIT's shibboleth system.
|
||||
"""
|
||||
|
||||
def __init__(self, username: Optional[str] = None, password: Optional[str] = None) -> None:
|
||||
self._auth = UserPassAuthenticator("KIT ILIAS Shibboleth", username, password)
|
||||
def __init__(self, authenticator: Optional[UserPassAuthenticator] = None) -> None:
|
||||
if authenticator:
|
||||
self._auth = authenticator
|
||||
else:
|
||||
self._auth = UserPassAuthenticator("KIT ILIAS Shibboleth")
|
||||
|
||||
self._tfa_auth = TfaAuthenticator("KIT ILIAS Shibboleth")
|
||||
|
||||
def authenticate(self, sess: requests.Session) -> None:
|
||||
|
Reference in New Issue
Block a user