Keep NextAuth as the OIDC/session layer and add a trusted Go provisioning endpoint that maps verified Authelia subjects to local users. Existing password accounts require explicit admin linking; new users are provisioned without a password. Enable the Authelia login path and update docs. Also fix test schema search_path so pg_trgm opclasses resolve.
This commit is contained in:
@@ -24,6 +24,7 @@ capped (100 per bookmark/tag/collection share, 200 per shared date).
|
||||
| POST | `/api/auth/signout` | `{ok:true}` and expired cookie; same-origin `Origin` required when present |
|
||||
| GET | `/api/me` | `{user,effectiveUser,isAdmin,viewingAs}`; real and effective identities |
|
||||
| GET | `/api/auth/oidc/status` | `{enabled,issuerSet,clientIdSet,clientSecretSet}`; never includes secrets or the issuer URL |
|
||||
| POST | `/api/auth/oidc/identity` | Server-to-server only: requires `typ=oidc-provision` bearer token; body `{issuer,subject,email,emailVerified,name,image}`; returns the local `{user,tokenVersion}` or **409** when an existing password account needs explicit linking |
|
||||
| GET | `/api/auth/oidc/login` | **501**, client-owned Authelia integration stub |
|
||||
| GET, POST | `/api/auth/callback/authelia` | **501**, client-owned callback stub |
|
||||
|
||||
@@ -256,7 +257,10 @@ Always uses the real user, even while viewing another account.
|
||||
|---|---|---|
|
||||
| GET | `/api/admin/users` | Safe user projections with bookmark/page/tag counts; excludes `@example.com` test users |
|
||||
| PATCH | `/api/admin/users` | `{ok:true}` for `{userId,role:"USER"\|"ADMIN"}`; refuses self-demotion |
|
||||
| POST | `/api/admin/oidc-link` | `{ok:true}` for `{userId,subject}`; explicitly links an existing local account to an Authelia subject; `409` when that subject is already linked elsewhere |
|
||||
| POST | `/api/admin/view-as` | `{ok:true}`; `{userId}` sets an eight-hour HttpOnly cookie, `{userId:null}` clears it |
|
||||
|
||||
Route registration: `internal/http/server.go`. Only the client-owned OIDC
|
||||
login/callback remain stubs; application data routes use PostgreSQL.
|
||||
login/callback remain stubs; application data routes use PostgreSQL. The
|
||||
trusted Next server exchanges verified Authelia identities at
|
||||
`POST /api/auth/oidc/identity`; that route is not a browser session endpoint.
|
||||
|
||||
Reference in New Issue
Block a user