3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00

fix auth-script example in the manual

This commit is contained in:
Shivaram Lingamneni 2020-11-13 12:44:09 -05:00
parent 4fc396c3ef
commit 99fca0553b

View File

@ -972,11 +972,11 @@ Here is a toy example of an authentication script in Python that checks that the
import sys, json
raw_input = sys.stdin.readline()
input = json.loads(b)
input = json.loads(raw_input)
account_name = input.get("accountName")
passphrase = input.get("passphrase")
success = bool(account_name) and bool(passphrase) and account_name == passphrase
print(json.dumps({"success": success})
print(json.dumps({"success": success}))
```
Note that after a failed script invocation, Oragono will proceed to check the credentials against its local database.