* Retrieve the various entries for the OAuth mechanism
*/
-boolean
+boolean
mh_oauth_get_service_info(const char *svc_name, mh_oauth_service_info *svcinfo,
char *errbuf, size_t errbuflen);
-
-char *mh_oauth_get_svc_name(mh_oauth_ctx *ctx);
-void mh_oauth_set_cred_fn(mh_oauth_ctx *ctx, char *filename);
if (decodeBase64(string, &decoded, &decodedlen, 1, NULL) == OK) {
/*
- * Some mechanisms preoduce large binary tokens, which aren't really
+ * Some mechanisms produce large binary tokens, which aren't really
* readable. So let's do a simple heuristic. If the token is greater
* than 100 characters _and_ the first 100 bytes are more than 50%
* non-ASCII, then don't print the decoded buffer, just the
if (nsc->ns_userid == NULL) {
/*
* Pass the 1 third argument to nmh_get_credentials() so that
- * a defauly user if the -user switch wasn't supplied, and so
+ * a default user if the -user switch wasn't supplied, and so
* that a default password will be supplied. That's used when
* those values really don't matter, and only with legacy/.netrc,
* i.e., with a credentials profile entry.
#define JSON_TYPE "application/json"
-/* We pretend access tokens expire 30 seconds earlier than they actually do to
+/* We pretend access tokens expire 60 seconds earlier than they actually do to
* allow for separate processes to use and refresh access tokens. The process
* that uses the access token (post) has an error if the token is expired; the
* process that refreshes the access token (send) must have already refreshed if
* the expiration is close.
*
- * 30s is arbitrary, and hopefully is enough to allow for clock skew.
+ * 60s is arbitrary, and hopefully is enough to allow for clock skew.
* Currently only Gmail supports XOAUTH2, and seems to always use a token
* life-time of 3600s, but that is not guaranteed. It is possible for Gmail to
* issue an access token with a life-time so short that even after send
* (not counting header and not null-terminated) */
#define RESPONSE_BODY_MAX 8192
-/* Maxium size for URLs and URI-encoded query strings, null-terminated.
+/* Maximum size for URLs and URI-encoded query strings, null-terminated.
*
* Actual maximum we need is based on the size of tokens (limited by
* RESPONSE_BODY_MAX), code user copies from a web page (arbitrarily large), and