Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test843
1 <testcase>
2 <info>
3 <keywords>
4 IMAP
5 SASL
6 SASL AUTH OAUTH2
7 SASL-IR
8 RFC6749
9 RFC7628
10 </keywords>
11 </info>
12
13 #
14 # Server-side
15 <reply>
16 <servercmd>
17 AUTH OAUTHBEARER
18 CAPA SASL-IR
19 REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
20 </servercmd>
21 <data>
22 From: me@somewhere\r
23 To: fake@nowhere\r
24 \r
25 body\r
26 \r
27 --\r
28   yours sincerely\r
29 </data>
30 </reply>
31
32 #
33 # Client-side
34 <client>
35 <server>
36 imap
37 </server>
38  <name>
39 IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response
40  </name>
41  <command>
42 'imap://%HOSTIP:%IMAPPORT/843/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
43 </command>
44 # The protocol section doesn't support ways of specifing the raw data in the
45 # base64 encoded message so we must assert this
46 <precheck>
47 perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
48 </precheck>
49 </client>
50
51 #
52 # Verify data after the test has been "shot"
53 <verify>
54 <protocol>
55 A001 CAPABILITY\r
56 A002 AUTHENTICATE OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==\r
57 A003 SELECT 843\r
58 A004 FETCH 1 BODY[]\r
59 A005 LOGOUT\r
60 </protocol>
61 </verify>
62 </testcase>