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