Expand description
OpenID Connect Core Error Code Extensions
This module implements additional error codes for OpenID Connect,
including the unmet_authentication_requirements error code and other
enhanced error handling capabilities.
§Implemented Error Extensions
unmet_authentication_requirements- Authentication requirements not met- Enhanced error descriptions and URIs
- Structured error reporting
- Error code validation and mapping
- Custom error code mappings for extensible error handling
§Custom Error Mappings
The OidcErrorManager supports custom error code mappings that allow:
- Mapping custom string identifiers to standard or extended error codes
- Runtime extensibility for domain-specific error codes
- Override standard error code mappings for specialized behavior
- Error code resolution from string identifiers
§Usage Examples
use auth_framework::server::oidc_error_extensions::{OidcErrorManager, OidcErrorCode};
let mut manager = OidcErrorManager::default();
// Add custom error mapping
manager.add_custom_error_mapping(
"payment_required".to_string(),
OidcErrorCode::InsufficientIdentityAssurance,
);
// Resolve error from identifier
let error_code = manager.resolve_error_code("payment_required");
// Create error response from identifier
let response = manager.create_error_response_from_identifier(
"payment_required",
Some("Payment verification required".to_string()),
Some("state123".to_string()),
std::collections::HashMap::new(),
).unwrap();Structs§
- Authentication
Requirements - Authentication requirements details
- Oidc
Error Manager - Error handling manager for OpenID Connect
- Oidc
Error Response - OpenID Connect error response
Enums§
- Oidc
Error Code - Extended OpenID Connect error codes