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>
This commit is contained in:
1 parent
db733a6bf4
commit
f5a20b72af
7 files changed
+1169
-42
No files matched your search
@@ -31,4 +31,4 @@ export {
|
||||
verifyTotp,
|
||||
} from './totp.js';
|
||||
export { runMigrations } from './migrate.js';
|
||||
export { AuthClient, InvalidSessionError, createAuthClient } from './authclient.js';
|
||||
export { APIError, AuthClient, InvalidSessionError, createAuthClient } from './authclient.js';
|
||||
Reference in new issue
Block a user