2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 2020-2022 the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include "claws-features.h"
29 #include "passwordstore.h"
31 #include "prefs_account.h"
33 #define OAUTH2BUFSIZE 8192
46 OA2_GRANT_TYPE_ACCESS
,
47 OA2_GRANT_TYPE_REFRESH
,
63 OAUTH2AUTH_LAST
= OAUTH2AUTH_YAHOO
66 typedef struct _OAUTH2Data OAUTH2Data
;
73 gchar
*custom_client_id
;
74 gchar
*custom_client_secret
;
77 gint
oauth2_init (OAUTH2Data
*OAUTH2Data
);
78 gint
oauth2_check_passwds (PrefsAccount
*ac_prefs
);
79 gint
oauth2_obtain_tokens (Oauth2Service provider
, OAUTH2Data
*OAUTH2Data
, const gchar
*authcode
);
80 gint
oauth2_authorisation_url (Oauth2Service provider
, gchar
**url
, const gchar
*custom_client_id
);
81 gint
oauth2_use_refresh_token (Oauth2Service provider
, OAUTH2Data
*OAUTH2Data
);
82 guchar
* oauth2_decode(const gchar
*in
);
83 void oauth2_encode(const gchar
*in
);
85 #endif /* USE_GNUTLS */