openagent-oidc · discovery
Declared module signatures, types, configuration, and source documentation.
Source: openagent-sdk/bridges/oidc/rust/src/discovery.rs. SHA-256: ce5af3534455570d352ac8a1051bc8612a3debed502a0b3a8a2c46f47967a70e.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
discovery::DiscoveryDocument
Subset of the OpenID Connect Discovery document that we need.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DiscoveryDocument {
/// The OIDC issuer identifier (MUST match the `issuer` in our config).
pub issuer: String,
/// URL of the authorization endpoint.
#[serde(default)]
pub authorization_endpoint: String,
/// URL of the token endpoint.
#[serde(default)]
pub token_endpoint: String,
/// URL of the JWKS endpoint.
pub jwks_uri: String,
/// Supported response types.
#[serde(default)]
pub response_types_supported: Vec<String>,
/// Supported subject identifier types.
#[serde(default)]
pub subject_types_supported: Vec<String>,
/// Supported ID token signing algorithms.
#[serde(default)]
pub id_token_signing_alg_values_supported: Vec<String>,
/// Supported scopes.
#[serde(default)]
pub scopes_supported: Vec<String>,
/// Token exchange endpoint (may differ from token_endpoint for some providers).
#[serde(default)]
pub token_exchange_endpoint: Option<String>
}Source line: 18.
discovery::DiscoveryClient
OIDC discovery client with per-issuer caching.
Cache entries expire after the configured TTL (default: 1 hour).
#[derive(Debug, Clone)]
pub struct DiscoveryClient {
}Source line: 57.
discovery::DiscoveryClient::new
Create a new discovery client.
pub fn new(timeout: Duration, cache_ttl: Duration) -> Self;Source line: 65.
discovery::DiscoveryClient::with_defaults
Create a discovery client with default settings (10s timeout, 1h cache TTL).
pub fn with_defaults() -> Self;Source line: 80.
discovery::DiscoveryClient::discover
Fetch (or return cached) the discovery document for the given issuer.
Errors
Returns [OidcBridgeError::Discovery] if the fetch or parse fails.
pub async fn discover(&self, issuer: &str) -> Result<DiscoveryDocument>;Source line: 89.
discovery::DiscoveryClient::invalidate
Invalidate the cache for a specific issuer.
pub async fn invalidate(&self, issuer: &str);Source line: 149.
discovery::DiscoveryClient::invalidate_all
Invalidate the entire cache.
pub async fn invalidate_all(&self);Source line: 155.