xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 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 | # |
| 14 | # Server-side |
| 15 | <reply> |
| 16 | <servercmd> |
| 17 | AUTH OAUTHBEARER |
| 18 | CAPA SASL-IR |
| 19 | REPLY AUTHENTICATE A002 OK AUTHENTICATE completed |
| 20 | </servercmd> |
| 21 | <data> |
| 22 | From: me@somewhere
|
| 23 | To: fake@nowhere
|
| 24 |
|
| 25 | body
|
| 26 |
|
| 27 | --
|
| 28 | yours sincerely
|
| 29 | </data> |
| 30 | </reply> |
| 31 | |
| 32 | # |
| 33 | # Client-side |
| 34 | <client> |
| 35 | <server> |
| 36 | imap |
| 37 | </server> |
| 38 | <name> |
| 39 | IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response |
| 40 | </name> |
| 41 | <command> |
| 42 | 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM |
| 43 | </command> |
| 44 | </client> |
| 45 | |
| 46 | # |
| 47 | # Verify data after the test has been "shot" |
| 48 | <verify> |
| 49 | <protocol> |
| 50 | A001 CAPABILITY
|
| 51 | A002 AUTHENTICATE OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
|
| 52 | A003 SELECT %TESTNUMBER
|
| 53 | A004 FETCH 1 BODY[]
|
| 54 | A005 LOGOUT
|
| 55 | </protocol> |
| 56 | </verify> |
| 57 | </testcase> |