forked from retoor/devplacepy
- Add `/block`, `/mute` endpoints with block/unblock and mute/unmute functionality in `routers/relations.py`, hiding blocked users' content everywhere except their own profile while muting only suppresses notifications - Introduce `devplace emoji-sync` CLI command to regenerate `static/js/emoji-shortcodes.js` from the emoji library, documented in `CLAUDE.md` and wired in `cli.py` - Create `get_blocked_uids()` database helper and apply it in `content.py` `load_detail()` to filter blocked users' posts from detail views - Implement `_uid_index()` and `_drop_index()` helpers in `database.py` for unique uid indexes across tables, with `user_relations` added to `SOFT_DELETE_TABLES` - Document new routes in `AGENTS.md` and `README.md`, including emoji shortcodes rendering behavior distinct from the emoji picker
23 lines
1.1 KiB
HTML
23 lines
1.1 KiB
HTML
<div class="docs-content" data-render>
|
|
# devRant API: Authentication & accounts
|
|
|
|
Write operations authenticate with the devRant token triple. Log in once below and every
|
|
authenticated widget across these pages becomes runnable (the token is kept in your browser
|
|
only). Read operations ([rants](/docs/devrant-rants.html),
|
|
[profiles](/docs/devrant-users.html)) need no authentication.
|
|
|
|
`POST /api/users/auth-token` returns an `auth_token` whose `id` is the `token_id`, `key` is the
|
|
`token_key`, and `user_id` is the integer user id; those three are sent automatically by these
|
|
widgets (query params for `GET`/`DELETE`, form body for `POST`). A bad login returns HTTP `400`.
|
|
See the [overview](/docs/devrant.html) for the response envelope.
|
|
|
|
A DevRant auth token (the `key` field) also works on the **main DevPlace API**: use it as a
|
|
Bearer token or `X-API-KEY` header on any DevPlace endpoint. See
|
|
[Authentication](/docs/authentication.html) for details.
|
|
|
|
DevPlace also has its own native token endpoint at `POST /auth/token` - see the
|
|
[Authentication](/docs/authentication.html) page.
|
|
</div>
|
|
{% set devrant_slug = 'devrant-auth' %}
|
|
{% include "docs/_devrant_endpoints.html" %}
|