mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +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
|
import sys, json
|
||||||
|
|
||||||
raw_input = sys.stdin.readline()
|
raw_input = sys.stdin.readline()
|
||||||
input = json.loads(b)
|
input = json.loads(raw_input)
|
||||||
account_name = input.get("accountName")
|
account_name = input.get("accountName")
|
||||||
passphrase = input.get("passphrase")
|
passphrase = input.get("passphrase")
|
||||||
success = bool(account_name) and bool(passphrase) and account_name == 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.
|
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