pop3: Added basic SASL XOAUTH2 support

Added the ability to use an XOAUTH2 bearer token [RFC6750] with POP3 for
authentication using RFC6749 "OAuth 2.0 Authorization Framework".

The bearer token is expected to be valid for the user specified in
conn->user. If CURLOPT_XOAUTH2_BEARER is defined and the connection has
an advertised auth mechanism of "XOAUTH2", the user and access token are
formatted as a base64 encoded string and sent to the server as
"AUTH XOAUTH2 <bearer token>".
This commit is contained in:
Steve Holme
2013-09-20 21:56:34 +01:00
parent 0e188e2dc3
commit 18db743851
6 changed files with 71 additions and 8 deletions

View File

@@ -1304,8 +1304,8 @@ as libcurl can determine the feature itself when the server supports the
SASL-IR CAPABILITY.
.IP CURLOPT_BEARER
Pass a char * as parameter, which should point to the zero terminated OAUTH
2.0 Bearer Access Token for use with IMAP and SMTP servers that support the
OAUTH 2.0 Authorization Framework. (Added in 7.33.0)
2.0 Bearer Access Token for use with IMAP. POP3 and SMTP servers that support
the OAUTH 2.0 Authorization Framework. (Added in 7.33.0)
Note: The user name used to generate the Bearer Token should be supplied via
the \fICURLOPT_USERNAME\fP option.