offlineimap.conf: learn to evaluate oauth2 related options

Introduce:
- oauth2_client_id_eval
- oauth2_client_secret_eval
- oauth2_access_token_eval
- oauth2_refresh_token_eval

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/307
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht
2016-07-23 02:49:13 +02:00
parent a1efae0703
commit b521b98d99
3 changed files with 30 additions and 7 deletions

View File

@ -829,6 +829,10 @@ remoteuser = username
#
#oauth2_client_id = YOUR_CLIENT_ID
#oauth2_client_secret = YOUR_CLIENT_SECRET
#
# The return values must be bytes.
#oauth2_client_id_eval = get_client_id("accountname")
#oauth2_client_secret_eval = get_client_secret("accountname")
# Specify the refresh token to use for the connection to the mail server.
# Here's an example of a way to get a refresh token:
@ -853,6 +857,10 @@ remoteuser = username
#oauth2_access_token = ACCESS_TOKEN
#oauth2_request_url = https://accounts.google.com/o/oauth2/token
#oauth2_refresh_token = REFRESH_TOKEN
#
# The return values must be bytes.
#oauth2_access_token_eval = get_access_token("accountname")
#oauth2_refresh_token_eval = get_refresh_token("accountname")
########## Passwords