test949 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. # Server-side
  15. <reply>
  16. <servercmd>
  17. AUTH OAUTHBEARER
  18. REPLY AUTH 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0
  19. REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth
  20. </servercmd>
  21. </reply>
  22. #
  23. # Client-side
  24. <client>
  25. <server>
  26. smtp
  27. </server>
  28. <name>
  29. SMTP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
  30. </name>
  31. <stdin>
  32. mail body
  33. </stdin>
  34. <command>
  35. 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 -
  36. </command>
  37. </client>
  38. #
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. # 67 - CURLE_LOGIN_DENIED
  42. <errorcode>
  43. 67
  44. </errorcode>
  45. #
  46. # The multi interface considers a broken "CONNECT" as a prematurely broken
  47. # transfer and such a connection will not get a "QUIT"
  48. <protocol>
  49. EHLO %TESTNUMBER
  50. AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
  51. AQ==
  52. </protocol>
  53. </verify>
  54. </testcase>