How azuread/microsoft-authentication-library-for-java works
Main Components
a) Core Authentication Components:
• Authentication Flows Module
• Interactive Flow
• Client Credentials Flow
• Device Code Flow
• On-Behalf-Of Flow
• Username/Password Flow
• Integrated Windows Authentication
b) Token Management:
• Token Cache System
• Token Request/Response Handlers
• Token Validation Components
c) Client Applications:
• Public Client Applications
• Confidential Client Applications
• Managed Identity Applications
d) Authority/Identity Providers:
• AAD Authority
• B2C Authority
• ADFS Authority
• CIAM Authority
Integration Points
a) External Services:
• Microsoft Identity Platform
• Azure AD
• Azure AD B2C
• Microsoft Graph API
b) Cache Extensions:
• Persistence Layer
• Cross-Process Cache Locking
• Platform-specific Storage (Windows, Linux, macOS)
Architectural Patterns to Highlight
a) Builder Pattern:
• Client application builders
• Authentication parameters builders
b) Factory Pattern:
• Client credential factories
• Authority factories
┌─────────────────────────────────────────────────────────┐
• Client Applications │
• ┬───────────────────┬────────────────────┤
• Public Client │ Confidential │ Managed Identity │
• Application │ Client Application│ Application │
• ┬───────┴────────┬──────────┴────────┬──────────┘
┌───────▼────────────────▼────────────────────▼──────────┐
• Authentication Flows Layer │
• ┬────────────────┬──────────────────┬────────────┘
┌───────▼────────┐ ┌────▼─────────┐ ┌──────▼───────────┐
• Token Manager │ │ Cache Manager │ │ Authority Manager│
• ┬────────┘ └──────────────┘ └──────────────────┘
┌───────▼────────────────────────────────────────────────┐
• External Identity Services │
• ┘
Important Details
• Token lifecycle paths
• Cache interaction patterns
• Security boundary demarcations
• Error handling paths
Implementation Notes
• Use standardized UML notation where applicable
• Version information (current: 1.18.0)
• Java 8+ compatibility