test946 984 B

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