How openidc/liboauth2 works
liboauth2 is a reusable C library for OAuth 2.x and OpenID Connect clients, servers, and web-server bindings. A typical request enters through an Apache or NGINX binding, is represented through the HTTP abstraction, and is processed by protocol/token-verification or OpenID Connect logic; session handling and configurable caches support the resulting authentication flow. The README documents additional protocol and token-location capabilities that are represented at subsystem level because their implementation was not sampled. Edges are limited to documented relationships or source-index references; unsampled wiring is omitted.
Main entry points: oauth2.c OAuth token engine · http.c HTTP abstraction · openidc.c OIDC flow · cache.c Cache framework
Components 18
Web-server bindings
- Apache binding
src/server/apache.c - NGINX binding
src/server/nginx.c
OAuth and security
- OAuth token engine
src/oauth2.c - Protocol operations
src/proto.c - DPoP validation
src/dpop.c - JOSE and JWT
src/jose.c
OpenID Connect
- OIDC flow
src/openidc/openidc.c - OIDC client
src/openidc/client.c - Provider resolver
src/openidc/resolver.c - Provider and state
src/openidc/state.c - Session management
src/session.c
Shared infrastructure
- HTTP abstraction
src/http.c - Configuration
src/cfg - Cache framework
src/cache.c - Cache backends
src/cache - Interprocess support
src/ipc.c - Utilities
src/util.c
Other components
- Web client
Connections 22
- Web client → Apache binding: sends request
- Web client → NGINX binding: sends request
- Apache binding → HTTP abstraction: abstracts requests
- NGINX binding → HTTP abstraction: abstracts requests
- HTTP abstraction → OAuth token engine: provides request
- OAuth token engine → JOSE and JWT: uses JWT
src/oauth2.c - OAuth token engine → HTTP abstraction: uses HTTP
src/oauth2.c - OAuth token engine → DPoP validation: validates proof
- OAuth token engine → Protocol operations: supports protocol
- OIDC flow → OAuth token engine: uses OAuth
src/openidc/openidc.c - OIDC flow → JOSE and JWT: uses JOSE
src/openidc/openidc.c - OIDC flow → Session management: uses sessions
src/openidc/openidc.c - OIDC flow → Provider resolver: resolves provider
- OIDC client → Provider resolver: uses resolver
- Provider and state → OIDC flow: supports state
- Session management → Cache framework: stores records
src/session.c - Cache framework → Cache backends: dispatches backend
- Provider resolver → Cache framework: uses cache
src/openidc/resolver.c - Configuration → Cache framework: configures cache
src/cfg/session_cfg.c - Configuration → Interprocess support: uses IPC
src/cfg/session_cfg.c - HTTP abstraction → Utilities: uses helpers
src/http.c - JOSE and JWT → HTTP abstraction: fetches keys
src/jose.c