daboross / screeps-starter-python

Starter Python AI for screeps, the JavaScript MMO game
MIT License
158 stars 62 forks source link

Added X-Token support to build.py #17

Closed jim-hart closed 5 years ago

jim-hart commented 5 years ago

build.py now supports X-Tokens. If token, username, and password are present, the token will be used. Modified config.default.json to include a token entry instead of username and password, and removed references to entries in documentation book, which were replaced by auth-token setup instructions. Basic access authentication still supported by build.py and these changes will not affect existing users.

Reasoning: This announcement last year provided auth tokens as an alternative to basic access authentication for access to screeps user endpoints. In February, basic access authentication was removed, with the exception of the /api/user/code/ endpoint, which is why build.py remains unaffected.

The discussion here posed good points for keeping basic access around for code pushing, and I agree users should have a choice in what authentication method they use. However, I also feel using tokens over usernames and password is inherently more secure and should be supported over usernames and passwords going forward.