]> diplodocus.org Git - nmh/blobdiff - h/oauth.h
Fix tests with oauth disabled.
[nmh] / h / oauth.h
index a49cb4aced55cc56513dcca73f343a0b446cf467..0abaaa34907846f1f7dd8cb559cf2104780a4ea0 100644 (file)
--- a/h/oauth.h
+++ b/h/oauth.h
@@ -63,6 +63,10 @@ typedef enum {
     /* Attempting to refresh an access token without a refresh token. */
     MH_OAUTH_NO_REFRESH,
 
+
+    /* requested user not in cred file */
+    MH_OAUTH_CRED_USER_NOT_FOUND,
+
     /* error loading serialized credentials */
     MH_OAUTH_CRED_FILE
 } mh_oauth_err_code;
@@ -196,7 +200,7 @@ mh_oauth_cred_fn(mh_oauth_ctx *ctx);
  * On error, return FALSE.
  */
 boolean
-mh_oauth_cred_save(FILE *fp, mh_oauth_cred *cred);
+mh_oauth_cred_save(FILE *fp, mh_oauth_cred *cred, const char *user);
 
 /*
  * Load OAuth tokens from file.
@@ -206,7 +210,7 @@ mh_oauth_cred_save(FILE *fp, mh_oauth_cred *cred);
  * On error, return NULL.
  */
 mh_oauth_cred *
-mh_oauth_cred_load(FILE *fp, mh_oauth_ctx *ctx);
+mh_oauth_cred_load(FILE *fp, mh_oauth_ctx *ctx, const char *user);
 
 /*
  * Return null-terminated SASL client response for XOAUTH2 from access token.