Mercurial > prosody-modules
comparison mod_register_json/README.markdown @ 3291:4c3230c22c18
mod_register_json: Update README
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 29 Aug 2018 21:57:59 +0100 |
parents | ea6b5321db50 |
children | 42dac034b2e0 |
comparison
equal
deleted
inserted
replaced
3290:87769f53fdc8 | 3291:4c3230c22c18 |
---|---|
22 | 22 |
23 eyJ1c2VybmFtZSI6InVzZXJuYW1lb2ZjaG9pY2UiLCJwYXNzd29yZCI6InRoZXVzZXJwYXNzd29yZCIsImlwIjoidGhlcmVtb3RlYWRkcm9mdGhldXNlciIsIm1haWwiOiJ1c2VybWFpbEB1c2VybWFpbGRvbWFpbi50bGQiLCJhdXRoX3Rva2VuIjoieW91cmF1dGh0b2tlbm9mY2hvaWNlIn0= | 23 eyJ1c2VybmFtZSI6InVzZXJuYW1lb2ZjaG9pY2UiLCJwYXNzd29yZCI6InRoZXVzZXJwYXNzd29yZCIsImlwIjoidGhlcmVtb3RlYWRkcm9mdGhldXNlciIsIm1haWwiOiJ1c2VybWFpbEB1c2VybWFpbGRvbWFpbi50bGQiLCJhdXRoX3Rva2VuIjoieW91cmF1dGh0b2tlbm9mY2hvaWNlIn0= |
24 | 24 |
25 Where the encoded content is this (example) JSON Array: | 25 Where the encoded content is this (example) JSON Array: |
26 | 26 |
27 {"username":"usernameofchoice","password":"theuserpassword","ip":"theremoteaddroftheuser","mail":"usermail@usermaildomain.tld","auth\_token":"yourauthtokenofchoice"}\</code\> | 27 ``` |
28 { | |
29 "username":"john.smith", | |
30 "password":"secret-password", | |
31 "ip":"192.168.0.0", | |
32 "mail":"john.smith@mail.example.net", | |
33 "auth_token":"yourauthtokenofchoice" | |
34 } | |
35 ``` | |
28 | 36 |
29 Your form implementation needs to pass **all** parameters, the | 37 Your form implementation needs to pass **all** parameters, the |
30 auth\_token is needed to prevent misuses, if the request is successful | 38 auth\_token is needed to prevent misuses, if the request is successful |
31 the server will answer with status code 200 and with the body of the | 39 the server will answer with status code 200 and with the body of the |
32 response containing the token which your web app can send via e-mail to | 40 response containing the token which your web app can send via e-mail to |
61 modules\_enabled. | 69 modules\_enabled. |
62 | 70 |
63 Hint: pairing with mod\_register\_redirect is helpful, to allow server | 71 Hint: pairing with mod\_register\_redirect is helpful, to allow server |
64 registrations only via your webform. | 72 registrations only via your webform. |
65 | 73 |
74 | |
75 Required configuration: | |
76 | |
77 ``` | |
78 reg_servlet_auth_token = "your-secret-token" | |
79 ``` | |
80 | |
66 Optional configuration directives: | 81 Optional configuration directives: |
67 | 82 |
83 ``` | |
68 reg_servlet_base = "/base-path/" -- Base path of the plugin (default is register_account) | 84 reg_servlet_base = "/base-path/" -- Base path of the plugin (default is register_account) |
69 reg_servlet_secure = true -- Have the plugin only process requests on https (default is true) | 85 reg_servlet_secure = true -- Have the plugin only process requests on https (default is true) |
70 reg_servlet_ttime = seconds -- Specifies the time (in seconds) between each request coming from the same remote address. | 86 reg_servlet_ttime = seconds -- Specifies the time (in seconds) between each request coming from the same remote address. |
71 reg_servlet_bl = { "1.2.3.4", "4.3.2.1" } -- The ip addresses in this list will be blacklisted and will not be able to submit registrations. | 87 reg_servlet_bl = { "1.2.3.4", "4.3.2.1" } -- The ip addresses in this list will be blacklisted and will not be able to submit registrations. |
72 reg_servlet_wl = { "1.2.3.4", "4.3.2.1" } -- The ip addresses in this list will be ignored by the throttling. | 88 reg_servlet_wl = { "1.2.3.4", "4.3.2.1" } -- The ip addresses in this list will be ignored by the throttling. |
73 reg_servlet_filtered_mails = { ".*banneddomain.tld", ".*deamailprovider.tld" } -- allows filtering of mail addresses via Lua patterns. | 89 reg_servlet_filtered_mails = { ".*banneddomain.tld", ".*deamailprovider.tld" } -- allows filtering of mail addresses via Lua patterns. |
90 ``` | |
74 | 91 |
75 Compatibility | 92 Compatibility |
76 ------------- | 93 ------------- |
77 | 94 |
78 0.9 | 95 0.9 |