Mercurial > hg > nginx-site
changeset 1063:6a19aadc15b2
Updates and unification for mail_auth_http_module examples.
This includes:
- switch to documentation IP-addresses as per rfc5737
- language neutral comments
- addition of the "Client-Host" header field
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sat, 08 Feb 2014 17:42:39 +0400 |
parents | 4002f7a0bf35 |
children | 3ee0ba5f4f08 |
files | xml/en/docs/mail/ngx_mail_auth_http_module.xml xml/ru/docs/mail/ngx_mail_auth_http_module.xml |
diffstat | 2 files changed, 28 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/mail/ngx_mail_auth_http_module.xml +++ b/xml/en/docs/mail/ngx_mail_auth_http_module.xml @@ -78,25 +78,26 @@ Request: <example> GET /auth HTTP/1.0 Host: localhost -Auth-Method: plain # plain or apop or cram-md5 +Auth-Method: plain # plain/apop/cram-md5 Auth-User: user Auth-Pass: password -Auth-Protocol: imap # imap, pop3 or smtp -Auth-Login-Attempt: 1 # attempt count in a single session -Client-IP: 192.168.1.1 +Auth-Protocol: imap # imap/pop3/smtp +Auth-Login-Attempt: 1 +Client-IP: 192.0.2.42 +Client-Host: client.example.org </example> Good response: <example> -HTTP/1.0 200 OK # this line is ignored +HTTP/1.0 200 OK Auth-Status: OK -Auth-Server: 10.1.1.1 +Auth-Server: 198.51.100.1 Auth-Port: 143 </example> Bad response: <example> -HTTP/1.0 200 OK # this line is ignored +HTTP/1.0 200 OK Auth-Status: Invalid login or password -Auth-Wait: 3 # wait for 3 seconds before returning an error to the client +Auth-Wait: 3 </example> </para> @@ -122,14 +123,15 @@ Auth-User: user Auth-Salt: <238188073.1163692009@mail.example.com> Auth-Pass: auth_response Auth-Protocol: imap -Auth-Login-Attempt: 1 # attempt count in a single session -Client-IP: 192.168.1.1 +Auth-Login-Attempt: 1 +Client-IP: 192.0.2.42 +Client-Host: client.example.org </example> Good response: <example> -HTTP/1.0 200 OK # this line is ignored +HTTP/1.0 200 OK Auth-Status: OK -Auth-Server: 10.1.1.1 +Auth-Server: 198.51.100.1 Auth-Port: 143 Auth-Pass: plain-text-pass </example>
--- a/xml/ru/docs/mail/ngx_mail_auth_http_module.xml +++ b/xml/ru/docs/mail/ngx_mail_auth_http_module.xml @@ -77,25 +77,26 @@ auth_http_header X-Auth-Key "secret_stri <example> GET /auth HTTP/1.0 Host: localhost -Auth-Method: plain # plain или apop или cram-md5 +Auth-Method: plain # plain/apop/cram-md5 Auth-User: user Auth-Pass: password -Auth-Protocol: imap # imap, pop3 или smtp -Auth-Login-Attempt: 1 # какая по счёту попытка в рамках одной сессии -Client-IP: 192.168.1.1 +Auth-Protocol: imap # imap/pop3/smtp +Auth-Login-Attempt: 1 +Client-IP: 192.0.2.42 +Client-Host: client.example.org </example> Хороший ответ: <example> -HTTP/1.0 200 OK # эта строка игнорируется +HTTP/1.0 200 OK Auth-Status: OK -Auth-Server: 10.1.1.1 +Auth-Server: 198.51.100.1 Auth-Port: 143 </example> Плохой ответ: <example> -HTTP/1.0 200 OK # эта строка игнорируется +HTTP/1.0 200 OK Auth-Status: Invalid login or password -Auth-Wait: 3 # подождать три секунды перед выдачей ошибки клиенту +Auth-Wait: 3 </example> </para> @@ -120,14 +121,15 @@ Auth-User: user Auth-Salt: <238188073.1163692009@mail.example.com> Auth-Pass: auth_response Auth-Protocol: imap -Auth-Login-Attempt: 1 # какая по счёту попытка в рамках одной сессии -Client-IP: 192.168.1.1 +Auth-Login-Attempt: 1 +Client-IP: 192.0.2.42 +Client-Host: client.example.org </example> Хороший ответ: <example> -HTTP/1.0 200 OK # эта строка игнорируется +HTTP/1.0 200 OK Auth-Status: OK -Auth-Server: 10.1.1.1 +Auth-Server: 198.51.100.1 Auth-Port: 143 Auth-Pass: plain-text-pass </example>