Commit Graph
14 Commits
Author SHA1 Message Date
Gabriel20xxandClaude Sonnet 5 449bb6fd6a Auto-detect scheme for AUTHGUARD_URL instead of always assuming https
A bare host:port (e.g. a LAN AuthGuard reachable only over plain HTTP)
was always defaulting to https, so a TLS handshake against a plain-HTTP
AuthGuard failed at the transport level. Now a loopback, RFC1918/RFC4193
private, or link-local host (or a .local name) defaults to http instead;
an explicit http:// or https:// is still always honored as-is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 21:46:53 +02:00
Gabriel20xx de9b599232 authclient: auto-detect https for a bare AUTHGUARD_URL host, extend Java client to full surface
AUTHGUARD_URL only needs to name a host/IP now - all four language
clients (Go/Node/Python/Java) assume https:// when no scheme is given,
so a bare value like 192.168.1.50:8080 works instead of failing
outright; an explicit http://scheme is still left alone for local/LAN
deployments.

Java's AuthClient was validate-only; it now mirrors the Go/Node/Python
clients' full surface (register/login/logout/me/totp*/passwordReset*/
managedUsers*/setupStatus) using Jackson for the request/response JSON
this larger surface has to build and parse, since MegaBasterd (this
package's only verified consumer) already depends on Jackson.
2026-09-02 20:49:29 +02:00
Gabriel20xxandClaude Sonnet 5 f5a20b72af Extend Go/Python/Node authclient with the full AuthGuard API surface
Previously each authclient only supported GET /api/session/validate - the
"just gate requests behind a valid session" case. A service that runs its
own login/register/admin-user-management screens proxied to AuthGuard
(GameStream's pattern, now also used by InfiniteVideo and OutdoorGames)
needs much more: register, login, logout, me, totp_enable/verify/disable,
password-reset request/confirm, and managed-user list/create/update/delete.

The Go client already had this full surface from GameStream's original
migration; Python and Node only had validate(), so both gained the same
method set as Go, mirroring its behavior and JSON wire shapes exactly
(register/login/logout return the raw Set-Cookie values to forward,
totp_required surfaces on a 401 from login, etc). Also adds a SetupStatus/
setup_status/setupStatus method (GET /api/setup-status) so a service's own
first-launch flow can tell whether AuthGuard already has an account before
showing its own account-creation form, and adds totp_enabled to the Go
client's PublicUser (AuthGuard has reported it for a while; the client
just hadn't picked it up).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 10:37:21 +02:00
Gabriel20xxandClaude Sonnet 5 d2ad20e0f8 Fix ty type error in authclient test: HTTPError needs a Message, not None
urllib.error.HTTPError's stub declares hdrs: Message (non-optional);
passing None works at runtime but fails strict type checking. Heretic's
lint workflow runs ty over its full tree including the vendored shared/
snapshot, which is what caught this - construct an empty Message()
instead, identical runtime behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 11:23:21 +02:00
Gabriel20xxandClaude Sonnet 5 ac516a7dc8 Add Python authclient module (mirrors the Go/Node authclient)
Async (asyncpg-consistent with the rest of this package), stdlib-only
HTTP via urllib + asyncio.to_thread (no new dependency for one GET
call). Framework-agnostic by design: read the two real consumers
(HordeWorker's aiohttp webui, Heretic's FastAPI app) and they don't
share a framework, so token_from_request/resolve_user work over plain
headers/cookies mappings rather than shipping a framework adapter.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 23:06:07 +02:00
Gabriel20xx c94f749430 fix: reformat config.py to match its declared 100-column line length
One line was wrapped as if for an 88-column budget, violating the
100-column ruff line-length this package declares in its own
pyproject.toml - ruff format (which respects that nested config)
correctly flagged it as unformatted.
2026-08-19 13:04:17 +02:00
Gabriel20xx da1cdca3b2 Rename shared code references 2026-08-06 16:55:51 +02:00
Gabriel20xx dfae1cb572 Bump Go and Python package release to 0.1.1
Publish Go package / Publish shared Go module (push) Successful in 57s
Publish npm packages / Publish shared npm packages (push) Failing after 39s
Publish Python package / Publish shared Python package (push) Successful in 12s
2026-08-06 12:12:04 +02:00
Gabriel20xx e2e21e84f7 Publish versioned shared Go module
Publish Go package / Publish shared Go module (push) Failing after 33s
2026-08-06 09:44:54 +02:00
Gabriel20xx 90080a8425 fix: use public SharedCode clone URL
Lint / Lint (Node/Svelte) (push) Successful in 17s
Lint / Lint (Go) (push) Successful in 19s
Lint / Lint (Python) (push) Successful in 9s
Tests / Test (Python) (push) Successful in 10s
Tests / Test (Node/Svelte) (push) Successful in 13s
Tests / Test (Go) (push) Successful in 20s
2026-08-06 08:59:24 +02:00
Gabriel20xx 2093c39ed2 fix: satisfy Ruff lint checks
Lint / Lint (Node/Svelte) (push) Successful in 14s
Lint / Lint (Go) (push) Successful in 16s
Lint / Lint (Python) (push) Successful in 9s
Tests / Test (Node/Svelte) (push) Successful in 14s
Tests / Test (Go) (push) Successful in 18s
Tests / Test (Python) (push) Successful in 10s
2026-08-05 16:00:40 +02:00
Gabriel20xx da97fd4fb1 feat(auth): implement TOTP setup and management
Lint / Lint (Node/Svelte) (push) Successful in 24s
Tests / Test (Go) (push) Successful in 25s
Lint / Lint (Go) (push) Successful in 28s
Lint / Lint (Python) (push) Failing after 14s
Tests / Test (Node/Svelte) (push) Successful in 18s
Tests / Test (Python) (push) Successful in 12s
- Added TOTP support for two-factor authentication in the auth module.
- Introduced new types and interfaces for TOTP setup and token actions in the web UI.
- Created backend logic for generating and verifying TOTP secrets and tokens.
- Implemented user management features including role assignments and user CRUD operations.
- Enhanced UI components for managing users and TOTP settings.
- Added styles for optional labels and authentication reset links.
- Implemented reset code generation and validation for admin accounts.
2026-08-05 14:57:01 +02:00
Gabriel20xx fbbdab49bc Add lint and test workflows
Tests / Test (Go) (push) Successful in 1m46s
Tests / Test (Python) (push) Successful in 14s
Lint / Lint (Go) (push) Successful in 21s
Lint / Lint (Python) (push) Successful in 10s
Tests / Test (Node/Svelte) (push) Successful in 12s
Lint / Lint (Node/Svelte) (push) Successful in 40s
2026-08-04 15:23:36 +02:00
Gabriel20xx 838a97d344 Add initial shared code packages 2026-08-04 15:17:15 +02:00