52 const char *method,
bool xoauth2)
55 char *oauthbearer = NULL;
56 const char *authtype = xoauth2 ?
"XOAUTH2" :
"OAUTHBEARER";
69 if (!method && !c_imap_oauth_refresh_command)
104 mutt_error(
_(
"%s authentication failed"), authtype);
IMAP authenticator multiplexor.
ImapAuthRes
Results of IMAP Authentication.
@ IMAP_AUTH_FAILURE
Authentication failed.
@ IMAP_AUTH_SUCCESS
Authentication successful.
@ IMAP_AUTH_UNAVAIL
Authentication method not permitted.
static enum ImapAuthRes imap_auth_oauth_xoauth2(struct ImapAccountData *adata, const char *method, bool xoauth2)
Authenticate an IMAP connection using OAUTHBEARER or XOAUTH2.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
char * mutt_account_getoauthbearer(struct ConnAccount *cac, bool xoauth2)
Get an OAUTHBEARER/XOAUTH2 token.
Convenience wrapper for the core headers.
enum ImapAuthRes imap_auth_xoauth2(struct ImapAccountData *adata, const char *method)
Authenticate an IMAP connection using XOAUTH2 - Implements ImapAuth::authenticate() -.
enum ImapAuthRes imap_auth_oauth(struct ImapAccountData *adata, const char *method)
Authenticate an IMAP connection using OAUTHBEARER - Implements ImapAuth::authenticate() -.
#define mutt_message(...)
int imap_exec(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags)
Execute a command and wait for the response from the server.
#define IMAP_CMD_NO_FLAGS
No flags are set.
#define IMAP_CMD_PASS
Command contains a password. Suppress logging.
@ IMAP_EXEC_SUCCESS
Imap command executed or queued successfully.
#define IMAP_CAP_SASL_IR
SASL initial response draft.
#define IMAP_CAP_AUTH_XOAUTH2
AUTH=XOAUTH2, deprecated but used by OWA.
#define IMAP_CAP_AUTH_OAUTHBEARER
RFC7628: AUTH=OAUTHBEARER.
Convenience wrapper for the library headers.
int mutt_str_asprintf(char **strp, const char *fmt,...)
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Pop-specific Account data.
#define mutt_socket_send(conn, buf)
unsigned int ssf
Security strength factor, in bits (see notes)
struct ConnAccount account
Account details: username, password, etc.
IMAP-specific Account data -.
ImapCapFlags capabilities
Capability flags.
struct Connection * conn
Connection to IMAP server.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.