{"openapi":"3.1.0","info":{"title":"CS Legends","version":"0.1.0"},"paths":{"/login":{"get":{"summary":"Login Page","description":"Login form; doubles as the ``/account`` redirect target.","operationId":"login_page_login_get","parameters":[{"name":"registered","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Registered"}},{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"summary":"Login Submit","description":"Form login: sets HttpOnly cookies and redirects back into the site.","operationId":"login_submit_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/register":{"get":{"summary":"Register Page","operationId":"register_page_register_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"summary":"Register Submit","description":"Create an account, then send the visitor to the login form.","operationId":"register_submit_auth_register_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_register_submit_auth_register_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token":{"post":{"summary":"Token Endpoint","description":"OAuth2 password grant: ``username`` may be an email or a username.","operationId":"token_endpoint_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_endpoint_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"summary":"Refresh Endpoint","description":"Rotate the refresh token; accepts a cookie or a JSON/form body token.","operationId":"refresh_endpoint_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/logout":{"post":{"summary":"Logout","description":"Revoke this device's refresh token, clear cookies and return home.","operationId":"logout_auth_logout_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_logout_auth_logout_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Account Page","description":"Account page; guests are bounced to the login form.","operationId":"account_page_account_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/me":{"get":{"summary":"Me","description":"Current user as JSON (accepts Bearer or cookie).","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me Api Me Get"}}}}}}},"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api Health Get"}}}}}}},"/api/players/zywoo":{"get":{"summary":"Player Api","operationId":"player_api_api_players_zywoo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_login_submit_auth_login_post":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"csrf_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csrf Token"},"next":{"type":"string","title":"Next","default":"/"}},"type":"object","required":["username","password"],"title":"Body_login_submit_auth_login_post"},"Body_logout_auth_logout_post":{"properties":{"csrf_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csrf Token"}},"type":"object","title":"Body_logout_auth_logout_post"},"Body_register_submit_auth_register_post":{"properties":{"email":{"type":"string","title":"Email"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"password_confirm":{"type":"string","title":"Password Confirm"},"csrf_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Csrf Token"},"next":{"type":"string","title":"Next","default":"/"}},"type":"object","required":["email","username","password","password_confirm"],"title":"Body_register_submit_auth_register_post"},"Body_token_endpoint_auth_token_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_token_endpoint_auth_token_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}