setting
Since encryption tokens are exchanged between the server and users, it is necessary to set the private key used for the exchange of tokens. You need to configure these settings in ```settings.py````.
danger
- Enter a secret key that is used only on this server in the Server secret key field. Also, do not manage assets with the server's private key.
- We recommend setting a short expiration date to prevent unauthorized entry due to token theft. However, if it is extremely short, the user will not have time to sign, so be careful.
item name | use | ценность |
---|---|---|
SERVER_SECRET | Private key used by the server | String(64) |
PUB | public key used by the server | String(64) |
OWNER | Server's Symbol address (no hyphens) | String(39) |
NETWORK_TYPE | network type | Int(mainnet:104, testnet:152) |
EXPIRATION_DATE | Expiration time for encrypted messages accepted by server | Int (milliseconds) |
Setting Example
SERVER_SECRET = '0000000000000000000000000000000000000000000000000000000000000000'
PUB = "3B6A27BCCEB6A42D62A3A8D02A6F0D73653215771DE243A63AC048A18B59DA29"
OWNER = "TCHBDENCLKEBILBPWP3JPB2XNY64OE7PYHHE32I"
NETWORK_TYPE = 152
EXPIRATION_DATE = 60 * 1 * 1 * 1000