test949 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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/949 --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. # The protocol section doesn't support ways of specifying the raw data in the
  38. # base64 encoded message so we must assert this
  39. <precheck>
  40. perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%SMTPPORT' ne '9005' );"
  41. </precheck>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. # 67 - CURLE_LOGIN_DENIED
  47. <errorcode>
  48. 67
  49. </errorcode>
  50. #
  51. # The multi interface considers a broken "CONNECT" as a prematurely broken
  52. # transfer and such a connection will not get a "QUIT"
  53. <protocol>
  54. EHLO 949
  55. AUTH OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
  56. AQ==
  57. </protocol>
  58. </verify>
  59. </testcase>