test948 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== 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/948 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -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 948
  55. AUTH OAUTHBEARER
  56. dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwNQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
  57. AQ==
  58. </protocol>
  59. </verify>
  60. </testcase>