How doko89/identityhub works
IdentityHub is a single-tenant identity provider for local and LDAP-backed users, with browser login, MFA, OIDC/SAML SSO, legacy LDAP/RADIUS authentication, an app dashboard, and administration. The main user flow is a login request through HTTP or a legacy listener, shared authentication and optional MFA, then a session or protocol response; admin workflows manage users, groups, applications, providers, and branding. The README documents several capabilities whose implementation details were not sampled, so those branches are shown at subsystem level. Dashed links mark documented or likely integration points not directly shown in excerpts.
Main entry points: handlers.go HTTP API · App.tsx Browser app · service.go Authentication · main.go IdentityHub runtime
Components 20
Runtime and API
- IdentityHub runtime
cmd/identityhub/main.go - HTTP API
internal/delivery/http/handlers.go
Identity and Access
- Authentication
internal/usecase/auth/service.go - LDAP directory client
internal/adapter/ldapclient/client.go - MFA policy
internal/usecase/mfa/service.go
Federation and Legacy
- OIDC flow
internal/usecase/oidcflow/service.go - SAML flow
internal/usecase/samlflow/service.go - LDAP listener
internal/delivery/ldap/server.go - RADIUS listener
internal/delivery/radius/server.go
Management and Data
- User and group service
internal/usecase/user/service.go - App catalog
internal/usecase/app/service.go - Audit service
internal/usecase/audit/service.go - Postgres persistence
internal/adapter/postgres/user_repository.go
Browser Experience
- Browser app
web/src/app/App.tsx - App dashboard
web/src/features/dashboard/pages/DashboardPage.tsx - Admin console
web/src/features/admin/pages/AdminUsersPage.tsx - Branding
web/src/features/branding/BrandProvider.tsx
Other components
- User or admin
- OIDC/SAML client
- Legacy client
Connections 22
- User or admin → Browser app: uses
README.md - Browser app → HTTP API: requests API
- IdentityHub runtime → HTTP API: serves
cmd/identityhub/main.go - User or admin → HTTP API: logs in
README.md - HTTP API → Authentication: authenticates
internal/delivery/http/handlers.go - Authentication → LDAP directory client: binds upstream
internal/adapter/ldapclient/client.go - Authentication → MFA policy: checks policy
- HTTP API → MFA policy: verifies factor
internal/delivery/http/handlers.go - HTTP API → User and group service: manages users
internal/delivery/http/handlers.go - HTTP API → OIDC flow: handles OIDC
internal/delivery/http/handlers.go - HTTP API → SAML flow: handles SAML
internal/delivery/http/handlers.go - OIDC/SAML client → HTTP API: starts SSO
README.md - Legacy client → LDAP listener: binds or searches
README.md - LDAP listener → Authentication: authenticates binds
internal/delivery/ldap/server.go - Legacy client → RADIUS listener: sends PAP
README.md - RADIUS listener → Authentication: authenticates PAP
internal/delivery/radius/server.go - HTTP API → App catalog: manages catalog
- HTTP API → Audit service: records activity
- Browser app → App dashboard: routes to
web/src/app/App.tsx - Browser app → Admin console: routes to
web/src/app/App.tsx - Browser app → Branding: provides theme
- IdentityHub runtime → Postgres persistence: wires persistence