summaryrefslogtreecommitdiff
path: root/lib/curl_sasl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/curl_sasl.h')
-rw-r--r--lib/curl_sasl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h
index 22dcf805b..964e94cad 100644
--- a/lib/curl_sasl.h
+++ b/lib/curl_sasl.h
@@ -32,6 +32,7 @@
#define SASL_MECH_GSSAPI (1 << 4)
#define SASL_MECH_EXTERNAL (1 << 5)
#define SASL_MECH_NTLM (1 << 6)
+#define SASL_MECH_XOAUTH2 (1 << 7)
/* Authentication mechanism values */
#define SASL_AUTH_NONE 0
@@ -85,6 +86,13 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
#endif /* USE_NTLM */
+/* This is used to generate a base64 encoded XOAUTH2 authentication message
+ containing the user name and bearer token */
+CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data,
+ const char *user,
+ const char *bearer,
+ char **outptr, size_t *outlen);
+
/* This is used to cleanup any libraries or curl modules used by the sasl
functions */
void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused);