Skip to content

Token Management

jagauthier edited this page Apr 26, 2017 · 7 revisions

For every call, an existing token is checked. Invalid tokens are rejected, and no data is inserted.

Report existing tokens in the database:
whserver.py -l

--- Authorization keys: ---
Token: 4RqROFkoEx37lmZUjGXQZcKdmf9fIhaE Assigned: John
Token: 60RZGghzw4g58f01D55zeIHueZJyxnKL Assigned: Dave
Token: ln4tpV3QGAU1y6McFvQrlSOXnFRb83Zs Assigned: Jimmy
Token: vlYx6AxIy3YtsOjg4CnLISczgE3KZ1D6 Assigned: Mikey

Add a token:
whserver.py -g Jason

 Generating authorization token for Jason
 Authorization token for Jason is: GGz90TO6YlUZcKehFH9MImKfI7U1LcME

Remove a token:
whserver.py -r GGz90TO6YlUZcKehFH9MImKfI7U1LcME

Token revoked.

Tokens are stored in a database table and are never deleted by the application. It's always a good idea to make backups of your databases.

If you are scanning multiple cities, you could assign one token per city for organization, or other interesting information. Or you can assign just one. There's information is reported when runtime statistics are enabled.

Clone this wiki locally