1<testcase> 2<info> 3<keywords> 4IMAP 5SASL 6SASL AUTH OAUTH2 7RFC6749 8</keywords> 9</info> 10 11# 12# Server-side 13<reply> 14<servercmd> 15AUTH XOAUTH2 16REPLY AUTHENTICATE + 17REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB A002 OK AUTHENTICATE completed 18</servercmd> 19<data> 20From: me@somewhere 21To: fake@nowhere 22 23body 24 25-- 26 yours sincerely 27</data> 28</reply> 29 30# 31# Client-side 32<client> 33<server> 34imap 35</server> 36<name> 37IMAP OAuth 2.0 (XOAUTH2) authentication 38</name> 39<command> 40'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM 41</command> 42</client> 43 44# 45# Verify data after the test has been "shot" 46<verify> 47<protocol> 48A001 CAPABILITY 49A002 AUTHENTICATE XOAUTH2 50dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB 51A003 SELECT %TESTNUMBER 52A004 FETCH 1 BODY[] 53A005 LOGOUT 54</protocol> 55</verify> 56</testcase> 57