pub struct OAuth2Config {Show 13 fields
pub client_id: String,
pub client_secret: SecretString,
pub auth_url: String,
pub token_url: String,
pub revocation_url: Option<String>,
pub redirect_uri: String,
pub scopes: Vec<String>,
pub flow_type: OAuth2FlowType,
pub additional_params: HashMap<String, String>,
pub security_level: SecurityLevel,
pub dpop_config: Option<DpopConfig>,
pub mcp_resource_uri: Option<String>,
pub auto_resource_indicators: bool,
}Expand description
OAuth 2.1 configuration
Fields§
§client_id: StringClient ID
client_secret: SecretStringClient secret (stored securely with automatic zeroization on drop)
auth_url: StringAuthorization endpoint
token_url: StringToken endpoint
revocation_url: Option<String>Token revocation endpoint (RFC 7009) - optional but recommended
redirect_uri: StringRedirect URI
scopes: Vec<String>Scopes to request
flow_type: OAuth2FlowTypeOAuth 2.1 flow type
additional_params: HashMap<String, String>Additional parameters
security_level: SecurityLevelSecurity level for OAuth flow
dpop_config: Option<DpopConfig>DPoP configuration (when security_level is Enhanced or Maximum)
mcp_resource_uri: Option<String>MCP server canonical URI for Resource Indicators (RFC 8707) This is the target resource server URI that tokens will be bound to
auto_resource_indicators: boolAutomatic Resource Indicator mode - when true, resource parameter is automatically included in all OAuth flows for MCP compliance
Trait Implementations§
Source§impl Clone for OAuth2Config
impl Clone for OAuth2Config
Source§fn clone(&self) -> OAuth2Config
fn clone(&self) -> OAuth2Config
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuth2Config
impl Debug for OAuth2Config
Source§impl<'de> Deserialize<'de> for OAuth2Config
impl<'de> Deserialize<'de> for OAuth2Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OAuth2Config
impl RefUnwindSafe for OAuth2Config
impl Send for OAuth2Config
impl Sync for OAuth2Config
impl Unpin for OAuth2Config
impl UnwindSafe for OAuth2Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more