quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test842 (1060B)


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