xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | SMTP |
| 5 | SASL |
| 6 | SASL AUTH OAUTH2 |
| 7 | SASL-IR |
| 8 | RFC4954 |
| 9 | RFC6749 |
| 10 | RFC7628 |
| 11 | </keywords> |
| 12 | </info> |
| 13 | |
| 14 | # |
| 15 | # Server-side |
| 16 | <reply> |
| 17 | <servercmd> |
| 18 | AUTH OAUTHBEARER |
| 19 | REPLY AUTH 235 Authenticated |
| 20 | </servercmd> |
| 21 | </reply> |
| 22 | |
| 23 | # |
| 24 | # Client-side |
| 25 | <client> |
| 26 | <server> |
| 27 | smtp |
| 28 | </server> |
| 29 | <name> |
| 30 | SMTP OAuth 2.0 (OAUTHBEARER) authentication with initial response |
| 31 | </name> |
| 32 | <stdin> |
| 33 | mail body
|
| 34 | </stdin> |
| 35 | <command> |
| 36 | smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T - |
| 37 | </command> |
| 38 | </client> |
| 39 | |
| 40 | # |
| 41 | # Verify data after the test has been "shot" |
| 42 | <verify> |
| 43 | <protocol> |
| 44 | EHLO %TESTNUMBER
|
| 45 | AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
| 46 | MAIL FROM:<sender@example.com>
|
| 47 | RCPT TO:<recipient@example.com>
|
| 48 | DATA
|
| 49 | QUIT
|
| 50 | </protocol> |
| 51 | <upload> |
| 52 | mail body
|
| 53 | .
|
| 54 | </upload> |
| 55 | </verify> |
| 56 | </testcase> |