Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test908
1 <testcase>
2 <info>
3 <keywords>
4 SMTP
5 SASL
6 SASL AUTH OAUTH2
7 RFC4954
8 RFC6749
9 </keywords>
10 </info>
11
12 #
13 # Server-side
14 <reply>
15 <servercmd>
16 AUTH XOAUTH2
17 REPLY AUTH 334 XOAUTH2 supported
18 REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB 235 Authenticated
19 </servercmd>
20 </reply>
21
22 #
23 # Client-side
24 <client>
25 <server>
26 smtp
27 </server>
28  <name>
29 SMTP OAuth 2.0 (XOAUTH2) authentication
30  </name>
31 <stdin>
32 mail body\r
33 </stdin>
34  <command>
35 smtp://%HOSTIP:%SMTPPORT/908 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
36 </command>
37 </client>
38
39 #
40 # Verify data after the test has been "shot"
41 <verify>
42 <protocol>
43 EHLO 908\r
44 AUTH XOAUTH2\r
45 dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB\r
46 MAIL FROM:<sender@example.com>\r
47 RCPT TO:<recipient@example.com>\r
48 DATA\r
49 QUIT\r
50 </protocol>
51 <upload>
52 mail body\r
53 .\r
54 </upload>
55 </verify>
56 </testcase>