The first visit to the UI creates the account from a username and password; after that every API route needs a session cookie from logging in. Accounts are stored in app_user (Argon2id password hashes) and sessions in user_session (SHA-256 token hashes, 30 days). The account page lets the user save a Listenbrainz token, checked with Listenbrainz first. It takes priority over listenbrainz.token from the config for LB Radio suggestions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
766 B
JSON
35 lines
766 B
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT username, listenbrainz_user, listenbrainz_token IS NOT NULL AS \"has_listenbrainz_token!\"\n FROM \"app_user\" WHERE id = $1\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "username",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "listenbrainz_user",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "has_listenbrainz_token!",
|
|
"type_info": "Bool"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
true,
|
|
null
|
|
]
|
|
},
|
|
"hash": "a8a3265d8f0f08b56916fe819a3834d0a41c153ceba338b00ff52f3e1ae39fe4"
|
|
}
|