test843 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <testcase>
  2. <info>
  3. <keywords>
  4. IMAP
  5. SASL
  6. SASL AUTH OAUTH2
  7. SASL-IR
  8. RFC6749
  9. RFC7628
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <servercmd>
  16. AUTH OAUTHBEARER
  17. CAPA SASL-IR
  18. REPLY AUTHENTICATE A002 OK AUTHENTICATE completed
  19. </servercmd>
  20. <data>
  21. From: me@somewhere
  22. To: fake@nowhere
  23. body
  24. --
  25. yours sincerely
  26. </data>
  27. </reply>
  28. #
  29. # Client-side
  30. <client>
  31. <server>
  32. imap
  33. </server>
  34. <name>
  35. IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response
  36. </name>
  37. <command>
  38. 'imap://%HOSTIP:%IMAPPORT/843/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
  39. </command>
  40. # The protocol section doesn't support ways of specifying the raw data in the
  41. # base64 encoded message so we must assert this
  42. <precheck>
  43. perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
  44. </precheck>
  45. </client>
  46. #
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <protocol>
  50. A001 CAPABILITY
  51. A002 AUTHENTICATE OAUTHBEARER dXNlcj11c2VyAWhvc3Q9MTI3LjAuMC4xAXBvcnQ9OTAwMwFhdXRoPUJlYXJlciBtRl85LkI1Zi00LjFKcU0BAQ==
  52. A003 SELECT 843
  53. A004 FETCH 1 BODY[]
  54. A005 LOGOUT
  55. </protocol>
  56. </verify>
  57. </testcase>