mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-02-22 00:42:03 +00:00
* chore: add oidc base config * wip: authorize page * feat: implement basic oidc functionality * refactor: implement oidc following tinyauth patterns * feat: adapt frontend to oidc flow * fix: review comments * fix: oidc review comments * feat: refresh token grant type support * feat: cleanup expired oidc sessions * feat: frontend i18n * fix: fix typo in error screen * tests: add basic testing * fix: more review comments * refactor: rework oidc error messages * feat: openid discovery endpoint * feat: jwk endpoint * i18n: fix typo * fix: more rabbit nitpicks * fix: final review comments * i18n: authorize page error messages
44 lines
773 B
SQL
44 lines
773 B
SQL
-- name: CreateSession :one
|
|
INSERT INTO "sessions" (
|
|
"uuid",
|
|
"username",
|
|
"email",
|
|
"name",
|
|
"provider",
|
|
"totp_pending",
|
|
"oauth_groups",
|
|
"expiry",
|
|
"created_at",
|
|
"oauth_name",
|
|
"oauth_sub"
|
|
) VALUES (
|
|
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
|
)
|
|
RETURNING *;
|
|
|
|
-- name: GetSession :one
|
|
SELECT * FROM "sessions"
|
|
WHERE "uuid" = ?;
|
|
|
|
-- name: DeleteSession :exec
|
|
DELETE FROM "sessions"
|
|
WHERE "uuid" = ?;
|
|
|
|
-- name: UpdateSession :one
|
|
UPDATE "sessions" SET
|
|
"username" = ?,
|
|
"email" = ?,
|
|
"name" = ?,
|
|
"provider" = ?,
|
|
"totp_pending" = ?,
|
|
"oauth_groups" = ?,
|
|
"expiry" = ?,
|
|
"oauth_name" = ?,
|
|
"oauth_sub" = ?
|
|
WHERE "uuid" = ?
|
|
RETURNING *;
|
|
|
|
-- name: DeleteExpiredSessions :exec
|
|
DELETE FROM "sessions"
|
|
WHERE "expiry" < ?;
|