2015-11-14 06:16:04 -05:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
IMAP
|
|
|
|
SASL
|
|
|
|
SASL AUTH OAUTH2
|
|
|
|
SASL-IR
|
|
|
|
RFC6749
|
|
|
|
RFC7628
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<servercmd>
|
|
|
|
AUTH OAUTHBEARER
|
|
|
|
CAPA SASL-IR
|
|
|
|
REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
|
|
|
|
</servercmd>
|
|
|
|
<data>
|
|
|
|
From: me@somewhere
|
|
|
|
To: fake@nowhere
|
|
|
|
|
|
|
|
body
|
|
|
|
|
|
|
|
--
|
|
|
|
yours sincerely
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
imap
|
|
|
|
</server>
|
|
|
|
<name>
|
2015-11-15 12:39:05 -05:00
|
|
|
IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response
|
2015-11-14 06:16:04 -05:00
|
|
|
</name>
|
|
|
|
<command>
|
|
|
|
'imap://%HOSTIP:%IMAPPORT/843/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
|
|
|
|
</command>
|
tests: Disable the OAUTHBEARER tests when using a non-default port number
Tests 842, 843, 844, 845, 887, 888, 889, 890, 946, 947, 948 and 949 fail
if a custom port number is specified via the -b option of runtests.pl.
Suggested by: Kamil Dudka
Bug: http://curl.haxx.se/mail/lib-2015-12/0003.html
2015-12-02 18:10:02 -05:00
|
|
|
# The data section doesn't do variable substitution, so we must assert this
|
|
|
|
<precheck>
|
|
|
|
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
|
|
|
|
</precheck>
|
2015-11-14 06:16:04 -05:00
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
|
|
|
A001 CAPABILITY
|
|
|
|
A002 AUTHENTICATE OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
|
|
|
|
A003 SELECT 843
|
|
|
|
A004 FETCH 1 BODY[]
|
|
|
|
A005 LOGOUT
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|