From 6227e2bd07246de7a751b8de8cece6020802c264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20Yaz=C4=B1c=C4=B1o=C4=9Flu?= Date: Sun, 16 Dec 2018 15:45:40 +0300 Subject: vauth/oauth2: Fix OAUTHBEARER token generation OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: #2487 Reported-by: Paolo Mossino Closes https://github.com/curl/curl/pull/3377 --- lib/vauth/vauth.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/vauth/vauth.h') diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h index f43064211..13ddc41f7 100644 --- a/lib/vauth/vauth.h +++ b/lib/vauth/vauth.h @@ -151,6 +151,13 @@ CURLcode Curl_auth_create_oauth_bearer_message(struct Curl_easy *data, const long port, const char *bearer, char **outptr, size_t *outlen); + +/* This is used to generate a base64 encoded XOAuth 2.0 message */ +CURLcode Curl_auth_create_xoauth_bearer_message(struct Curl_easy *data, + const char *user, + const char *bearer, + char **outptr, size_t *outlen); + #if defined(USE_KERBEROS5) /* This is used to evaluate if GSSAPI (Kerberos V5) is supported */ bool Curl_auth_is_gssapi_supported(void); -- cgit v1.2.3