summaryrefslogtreecommitdiffstats
path: root/contrib/caldav/calcurse-caldav.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/caldav/calcurse-caldav.py')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 39409d6..2c5757e 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -656,6 +656,11 @@ try:
# Authenticate with OAuth2 and authorize HTTP object
cred = run_auth(authcode)
conn = cred.authorize(conn)
+
+ # Add credentials to httplib2 to be used when request requires authentication
+ if authmethod == 'basic':
+ conn.add_credentials(username, password)
+
elif authmethod != 'basic':
die('Invalid option for AuthMethod in config file. Use "basic" or "oauth2"')