• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4SMTP
5SASL
6SASL AUTH OAUTH2
7SASL-IR
8RFC4954
9RFC6749
10RFC7628
11</keywords>
12</info>
13
14#
15# Server-side
16<reply>
17<servercmd>
18AUTH OAUTHBEARER
19REPLY AUTH 334 eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwic2NvcGUiOiJleGFtcGxlX3Njb3BlIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2V4YW1wbGUuY29tLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0
20REPLY AQ== 535 Username and Password not accepted. Learn more at\r\n535 http://support.example.com/mail/oauth
21</servercmd>
22</reply>
23
24#
25# Client-side
26<client>
27<server>
28smtp
29</server>
30 <name>
31SMTP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
32 </name>
33<stdin>
34mail body
35</stdin>
36 <command>
37smtp://%HOSTIP:%SMTPPORT/949 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
38</command>
39</client>
40
41#
42# Verify data after the test has been "shot"
43<verify>
44# 67 - CURLE_LOGIN_DENIED
45<errorcode>
4667
47</errorcode>
48#
49# The multi interface considers a broken "CONNECT" as a prematurely broken
50# transfer and such a connection will not get a "QUIT"
51<protocol>
52EHLO 949
53AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64%
54AQ==
55</protocol>
56</verify>
57</testcase>
58