You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* proxy: A string defining a proxy server: `scheme://hostname:port`. Scheme defaults to http, port defaults to 8080.
465
467
* username and password should be passed as arguments or in the URL
466
468
* auth, timeout and ssl_verify_cert are passed to niquests.request.
469
+
* if auth_type is given, the auth-object will be auto-created. Auth_type can be ``bearer``, ``digest`` or ``basic``. Things are likely to work without ``auth_type`` set, but if nothing else the number of requests to the server will be reduced.
467
470
* ssl_verify_cert can be the path of a CA-bundle or False.
468
471
* huge_tree: boolean, enable XMLParser huge_tree to handle big events, beware
469
472
of security issues, see : https://lxml.de/api/lxml.etree.XMLParser-class.html
@@ -515,10 +518,19 @@ def __init__(
515
518
516
519
self.username=username
517
520
self.password=password
521
+
self.auth=auth
522
+
self.auth_type=auth_type
523
+
518
524
## I had problems with passwords with non-ascii letters in it ...
519
525
ifisinstance(self.password, str):
520
526
self.password=self.password.encode("utf-8")
521
-
self.auth=auth
527
+
ifauthandself.auth_type:
528
+
logging.error(
529
+
"both auth object and auth_type sent to DAVClient. The latter will be ignored."
530
+
)
531
+
elifself.auth_type:
532
+
self.build_auth_object()
533
+
522
534
# TODO: it's possible to force through a specific auth method here,
0 commit comments