comparison mod_http_auth_check/README.markdown @ 2884:16e9f37b3f82

mod_http_auth_check: New HTTP module to test user credentials
author Nicolas Cedilnik <nicoco@nicoco.fr>
date Tue, 20 Feb 2018 12:57:44 +0000
parents
children c4db126a9f04
comparison
equal deleted inserted replaced
2883:7c16afc70d11 2884:16e9f37b3f82
1 ---
2 labels:
3 summary: 'Test account credentials using HTTP'
4 ...
5
6 Introduction
7 ------------
8
9 This module lets you test whether a set of credentials are valid,
10 using Prosody's configured authentication mechanism.
11
12 This is useful as an easy way to allow other (e.g. non-XMPP) applications
13 to authenticate users using their XMPP credentials.
14
15 Syntax
16 ------
17
18 To test credentials, issue a simple GET request with HTTP basic auth:
19
20 GET /auth_check HTTP/1.1
21 Authorization: Basic <base64(jid:password)>
22
23 Prosody will return a 2xx code on success (user exists and credentials are
24 correct), or 401 if the credentials are invalid. Any other code may be returned
25 if there is a problem handling the request.
26
27 ### Example usage
28
29 Here follows some example usage using `curl`.
30
31 curl http://prosody.local:5280/data/accounts -u user@example.com:secr1t