How juanifioren/django-oidc-provider works
Main Components
a. Core OIDC Provider Components:
• Authorization Endpoint
• Token Endpoint
• UserInfo Endpoint
• Session Management
• Introspection Endpoint
• Provider Configuration Endpoint
b. Supporting Systems:
• Database (for storing clients, tokens, and RSA keys)
• Template System (for UI components)
• Authentication System (Django's auth)
┌─ Client Applications Layer ─────────────────────┐
• (External OAuth2/OIDC Clients) │
• ┬───────────────────────────┘
• ↓
┌─ API Endpoints Layer ──────────────────────────┐
• ┌─────────┐ ┌──────┐ ┌────────┐ ┌──────────┐ │
• /authorize│ │/token│ │/userinfo│ │/.well-known│ │
• ┘ └──────┘ └────────┘ └──────────┘ │
• ┬───────────────────────────┘
• ↓
┌─ Core Logic Layer ───────────────────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌───────────────┐ │
• Claims Handler│ │Token Gen.│ │Scope Validator│ │
• ┘ └──────────┘ └───────────────┘ │
• ┬───────────────────────────┘
• ↓
┌─ Data Storage Layer ─────────────────────────────┐
• ┌──────────┐ ┌─────────┐ ┌────────┐ ┌───────┐ │
• RSA Keys │ │Clients │ │Tokens │ │Users │ │
• ┘ └─────────┘ └────────┘ └───────┘ │
• ┘
Important Flows to Highlight
a. Authorization Flow:
• Client → /authorize → User Authentication → Consent → Authorization Code
b. Token Flow:
• Client → /token → Validation → Access Token + ID Token
Technical Details to Note
• Authentication flows
• Data access
• API calls
• Internal communication
Implementation-Specific Details
• The separation between lib/ and views
• The role of middleware
• Template customization options
• Available management commands
Remember to:
• Clear boundaries between components
• Version information
• Document extension points