Skip to main content

securitydept_oauth_resource_server/config/
introspection.rs

1use serde::Deserialize;
2use serde_with::serde_as;
3
4#[derive(Debug, Clone, Deserialize, Default)]
5#[serde_as]
6pub struct OAuthResourceServerIntrospectionConfig {
7    /// Optional override for the RFC 7662 introspection endpoint.
8    ///
9    /// When omitted, the endpoint is read from discovery if available.
10    #[serde(default)]
11    #[serde_as(as = "NoneAsEmptyString")]
12    pub introspection_url: Option<String>,
13    /// OAuth client_id used when calling the introspection endpoint.
14    #[serde(default)]
15    #[serde_as(as = "NoneAsEmptyString")]
16    pub client_id: Option<String>,
17    /// OAuth client_secret used when calling the introspection endpoint.
18    #[serde(default)]
19    #[serde_as(as = "NoneAsEmptyString")]
20    pub client_secret: Option<String>,
21    /// Optional token type hint sent to the introspection endpoint.
22    ///
23    /// Typical values are `access_token` or `refresh_token`.
24    #[serde(default)]
25    #[serde_as(as = "NoneAsEmptyString")]
26    pub token_type_hint: Option<String>,
27}