test887 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <testcase>
  2. <info>
  3. <keywords>
  4. POP3
  5. SASL
  6. SASL AUTH OAUTH2
  7. RFC1734
  8. RFC5034
  9. RFC6749
  10. RFC7628
  11. </keywords>
  12. </info>
  13. #
  14. # Server-side
  15. <reply>
  16. <servercmd>
  17. AUTH OAUTHBEARER
  18. REPLY AUTH +
  19. REPLY dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ== +OK Login successful
  20. </servercmd>
  21. <data>
  22. From: me@somewhere
  23. To: fake@nowhere
  24. body
  25. --
  26. yours sincerely
  27. </data>
  28. </reply>
  29. #
  30. # Client-side
  31. <client>
  32. <server>
  33. pop3
  34. </server>
  35. <name>
  36. POP3 OAuth 2.0 (OAUTHBEARER) authentication
  37. </name>
  38. <command>
  39. pop3://%HOSTIP:%POP3PORT/887 -u user --oauth2-bearer mF_9.B5f-4.1JqM
  40. </command>
  41. # The protocol section doesn't support ways of specifying the raw data in the
  42. # base64 encoded message so we must assert this
  43. <precheck>
  44. perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%POP3PORT' ne '9001' );"
  45. </precheck>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <protocol>
  51. CAPA
  52. AUTH OAUTHBEARER
  53. dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMQFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
  54. RETR 887
  55. QUIT
  56. </protocol>
  57. </verify>
  58. </testcase>