test948 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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% 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. #vi
  23. # Client-side
  24. <client>
  25. <server>
  26. smtp
  27. </server>
  28. <name>
  29. SMTP OAuth 2.0 (OAUTHBEARER) failure as continuation
  30. </name>
  31. <stdin>
  32. mail body
  33. </stdin>
  34. <command>
  35. smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-from [email protected] -u user --oauth2-bearer mF_9.B5f-4.1JqM -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
  51. %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
  52. AQ==
  53. </protocol>
  54. </verify>
  55. </testcase>