Authentication tokens
I would like to be able to..
Get a json API with the player info via a auth token, this is already possible but only if logged in via a cookie, thus making it really hard to use in practice.
Is your feature request related to a problem? Please describe.
Yes, there is already something similar https://analytics.lendmark.sk/player/uuid/raw; however I can only find a "cookie" request header, instead of a actual auth header.
Perhaps somewhat related to #1965 and #1895, but I'd also be interested in a more token-like authentication scheme which doesn't require an api user to hijack cookies for api requests
What kind of token would this be? @SlenkyDev
What kind of token would this be? @SlenkyDev
Some kind of randomly generated authorization token in an authorization header that could be optained via the dashboard or a Minecraft command (e.g. planproxy grantapi)
TODO
- Add a database table to hold authentication tokens
- Id
- Token
- Issued
- Last used
- Add a commands
- to generate authentication tokens
- to list authentication tokens
- to revoke authentication tokens
- Add a permissions for the commands
- Add a cache for the authentication tokens so that they don't need to be fetched from database
- Make the cache entries expire 15 minutes without getting read
- Add another
Authenticationimplementation that checks for a token based authentication