Connection Credentials. More...
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | ConnAccount |
Login details for a remote server. More... | |
Macros | |
#define | MUTT_ACCT_NO_FLAGS 0 |
No flags are set. | |
#define | MUTT_ACCT_PORT (1 << 0) |
Port field has been set. | |
#define | MUTT_ACCT_USER (1 << 1) |
User field has been set. | |
#define | MUTT_ACCT_LOGIN (1 << 2) |
Login field has been set. | |
#define | MUTT_ACCT_PASS (1 << 3) |
Password field has been set. | |
#define | MUTT_ACCT_SSL (1 << 4) |
Account uses SSL/TLS. | |
Typedefs | |
typedef uint8_t | MuttAccountFlags |
Flags, Which ConnAccount fields are initialised, e.g. MUTT_ACCT_PORT. | |
Enumerations | |
enum | ConnAccountField { MUTT_CA_HOST = 1 , MUTT_CA_LOGIN , MUTT_CA_USER , MUTT_CA_PASS , MUTT_CA_OAUTH_CMD } |
Login credentials. More... | |
enum | ExpandoDataNntp { ED_NTP_ACCOUNT = 1 , ED_NTP_PORT , ED_NTP_PORT_IF , ED_NTP_SCHEMA , ED_NTP_SERVER , ED_NTP_USERNAME } |
Expando UIDs for NNTP. More... | |
Functions | |
int | mutt_account_getlogin (struct ConnAccount *account) |
Retrieve login info into ConnAccount, if necessary. | |
char * | mutt_account_getoauthbearer (struct ConnAccount *account, bool xoauth2) |
Get an OAUTHBEARER/XOAUTH2 token. | |
int | mutt_account_getpass (struct ConnAccount *account) |
Fetch password into ConnAccount, if necessary. | |
int | mutt_account_getuser (struct ConnAccount *account) |
Retrieve username into ConnAccount, if necessary. | |
void | mutt_account_unsetpass (struct ConnAccount *account) |
Unset ConnAccount's password. | |
Connection Credentials.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file connaccount.h.
#define MUTT_ACCT_NO_FLAGS 0 |
No flags are set.
Definition at line 42 of file connaccount.h.
#define MUTT_ACCT_PORT (1 << 0) |
Port field has been set.
Definition at line 43 of file connaccount.h.
#define MUTT_ACCT_USER (1 << 1) |
User field has been set.
Definition at line 44 of file connaccount.h.
#define MUTT_ACCT_LOGIN (1 << 2) |
Login field has been set.
Definition at line 45 of file connaccount.h.
#define MUTT_ACCT_PASS (1 << 3) |
Password field has been set.
Definition at line 46 of file connaccount.h.
#define MUTT_ACCT_SSL (1 << 4) |
Account uses SSL/TLS.
Definition at line 47 of file connaccount.h.
typedef uint8_t MuttAccountFlags |
Flags, Which ConnAccount fields are initialised, e.g. MUTT_ACCT_PORT.
Definition at line 41 of file connaccount.h.
enum ConnAccountField |
Login credentials.
Enumerator | |
---|---|
MUTT_CA_HOST | Server name. |
MUTT_CA_LOGIN | Login name. |
MUTT_CA_USER | User name. |
MUTT_CA_PASS | Password. |
MUTT_CA_OAUTH_CMD | OAuth refresh command. |
Definition at line 32 of file connaccount.h.
enum ExpandoDataNntp |
Expando UIDs for NNTP.
Enumerator | |
---|---|
ED_NTP_ACCOUNT | ConnAccount.account. |
ED_NTP_PORT | |
ED_NTP_PORT_IF | |
ED_NTP_SCHEMA | ConnAccount.account. |
ED_NTP_SERVER | ConnAccount.account. |
ED_NTP_USERNAME |
Definition at line 80 of file connaccount.h.
int mutt_account_getlogin | ( | struct ConnAccount * | cac | ) |
Retrieve login info into ConnAccount, if necessary.
cac | ConnAccount to fill |
0 | Success |
-1 | Failure |
Definition at line 100 of file connaccount.c.
char * mutt_account_getoauthbearer | ( | struct ConnAccount * | cac, |
bool | xoauth2 | ||
) |
Get an OAUTHBEARER/XOAUTH2 token.
cac | Account to use |
xoauth2 | Generate a deprecated XOAUTH2 token |
ptr | OAuth token |
NULL | Error |
Run an external command to generate the oauth refresh token for an account, then create and encode the OAUTHBEARER token based on RFC7628.
Definition at line 195 of file connaccount.c.
int mutt_account_getpass | ( | struct ConnAccount * | cac | ) |
Fetch password into ConnAccount, if necessary.
cac | ConnAccount to fill |
0 | Success |
-1 | Failure |
Definition at line 130 of file connaccount.c.
int mutt_account_getuser | ( | struct ConnAccount * | cac | ) |
Retrieve username into ConnAccount, if necessary.
cac | ConnAccount to fill |
0 | Success |
-1 | Failure |
Definition at line 51 of file connaccount.c.
void mutt_account_unsetpass | ( | struct ConnAccount * | cac | ) |
Unset ConnAccount's password.
cac | ConnAccount to modify |
Definition at line 177 of file connaccount.c.