Expand description
Who is calling: this server’s API tokens (bearer) and session cookies.
Players, tokens and sessions are the server’s own (chess.players,
chess.api_tokens, chess.sessions). Tokens are hashed with SHA-256,
with Lichess’s scope names (board:play, bot:play, challenge:read,
challenge:write, email:read) plus chess:fairplay for reviewers.
People make and revoke them on the Account page (crate::http::web),
through the OAuth flow, or (for a host site’s players) through the
site’s server (crate::http::web::esports_token). New tokens start
ocp_; tokens imported from a host site keep its esl_. A short cache
keeps a busy game from hitting the database for every move; a revoked
token stops working within CACHE_TTL.
Structs§
Constants§
- CACHE_
TTL - SCOPES
- Scopes this server understands (Lichess’s names, and one of ours).
- SESSION_
COOKIE - Signed in to this server (its own sign-in, or with the host site).
- SITE_
TOKEN_ PREFIX - Tokens imported from a host site (esports-lab) keep its prefix.
- TOKEN_
PREFIX - New tokens’ prefix.