test842 1.0 KB

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