mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-11 06:29:29 +01:00
fix auth-script example in the manual
This commit is contained in:
parent
4fc396c3ef
commit
99fca0553b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user