calcurse-caldav: fix basic authentication
Read whether basic authentication is used and add the credentials to httplib2 when making a request. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
61dc7ab538
commit
6a6c7117de
@ -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"')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user