xref: /curl/tests/data/test842 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4IMAP
5SASL
6SASL AUTH OAUTH2
7RFC6749
8RFC7628
9</keywords>
10</info>
11
12#
13# Server-side
14<reply>
15<servercmd>
16AUTH OAUTHBEARER
17REPLY AUTHENTICATE +
18REPLY %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
19</servercmd>
20<data>
21From: me@somewhere
22To: fake@nowhere
23
24body
25
26--
27  yours sincerely
28</data>
29</reply>
30
31#
32# Client-side
33<client>
34<server>
35imap
36</server>
37<name>
38IMAP OAuth 2.0 (OAUTHBEARER) authentication
39</name>
40<command>
41'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
42</command>
43# The protocol section doesn't support ways of specifying the raw data in the
44# base64 encoded message so we must assert this
45</client>
46
47#
48# Verify data after the test has been "shot"
49<verify>
50<protocol>
51A001 CAPABILITY
52A002 AUTHENTICATE OAUTHBEARER
53%b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
54A003 SELECT %TESTNUMBER
55A004 FETCH 1 BODY[]
56A005 LOGOUT
57</protocol>
58</verify>
59</testcase>
60