2015-11-14 06:16:04 -05:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
IMAP
|
|
|
|
SASL
|
|
|
|
SASL AUTH OAUTH2
|
|
|
|
RFC6749
|
|
|
|
RFC7628
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<servercmd>
|
|
|
|
AUTH OAUTHBEARER
|
|
|
|
REPLY AUTHENTICATE +
|
2020-08-04 07:56:12 -04:00
|
|
|
REPLY %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% A002 OK AUTHENTICATE completed
|
2015-11-14 06:16:04 -05:00
|
|
|
</servercmd>
|
|
|
|
<data>
|
|
|
|
From: me@somewhere
|
|
|
|
To: fake@nowhere
|
|
|
|
|
|
|
|
body
|
|
|
|
|
|
|
|
--
|
|
|
|
yours sincerely
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
imap
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
IMAP OAuth 2.0 (OAUTHBEARER) authentication
|
|
|
|
</name>
|
|
|
|
<command>
|
2018-07-31 07:12:18 -04:00
|
|
|
'imap://%HOSTIP:%IMAPPORT/842/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
|
2015-11-14 06:16:04 -05:00
|
|
|
</command>
|
2017-03-26 11:02:22 -04:00
|
|
|
# The protocol section doesn't support ways of specifying the raw data in the
|
2015-12-03 18:31:24 -05:00
|
|
|
# base64 encoded message so we must assert this
|
2015-11-14 06:16:04 -05:00
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
|
|
|
A001 CAPABILITY
|
|
|
|
A002 AUTHENTICATE OAUTHBEARER
|
2020-08-04 07:56:12 -04:00
|
|
|
%b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
2015-11-14 06:16:04 -05:00
|
|
|
A003 SELECT 842
|
|
|
|
A004 FETCH 1 BODY[]
|
|
|
|
A005 LOGOUT
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|