pub struct OAuthClientConfig {
pub client_id: Option<String>,
pub client_secret: Option<String>,
pub callback_port: Option<u16>,
pub scopes: Option<Vec<String>>,
}Expand description
Optional pre-registered OAuth 2.1 client settings for a remote HTTP MCP server.
Fields§
§client_id: Option<String>§client_secret: Option<String>§callback_port: Option<u16>§scopes: Option<Vec<String>>Implementations§
Source§impl OAuthClientConfig
impl OAuthClientConfig
Sourcepub fn normalized(self) -> Option<Self>
pub fn normalized(self) -> Option<Self>
Trims string fields and drops empty entries; returns None when nothing remains.
Sourcepub fn validate(&self, server_name: &str) -> Result<(), McpConfigError>
pub fn validate(&self, server_name: &str) -> Result<(), McpConfigError>
Validates OAuth client settings for server_name.
Sourcepub fn has_client_secret(&self) -> bool
pub fn has_client_secret(&self) -> bool
Returns whether a non-empty client_secret value is configured.
Sourcepub fn resolve(
&self,
server_name: &str,
env_lookup: &EnvLookup,
) -> Result<ResolvedOAuthClientConfig, McpConfigError>
pub fn resolve( &self, server_name: &str, env_lookup: &EnvLookup, ) -> Result<ResolvedOAuthClientConfig, McpConfigError>
Expands ${ENV_VAR} references in client_id and client_secret.
Sourcepub fn resolve_from_system(
&self,
server_name: &str,
) -> Result<ResolvedOAuthClientConfig, McpConfigError>
pub fn resolve_from_system( &self, server_name: &str, ) -> Result<ResolvedOAuthClientConfig, McpConfigError>
Expands ${ENV_VAR} references using process environment and blyte’s env file.
Trait Implementations§
Source§impl Clone for OAuthClientConfig
impl Clone for OAuthClientConfig
Source§impl Debug for OAuthClientConfig
impl Debug for OAuthClientConfig
Source§impl Default for OAuthClientConfig
impl Default for OAuthClientConfig
Source§impl<'de> Deserialize<'de> for OAuthClientConfig
impl<'de> Deserialize<'de> for OAuthClientConfig
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
impl Eq for OAuthClientConfig
Source§impl PartialEq for OAuthClientConfig
impl PartialEq for OAuthClientConfig
Source§impl Serialize for OAuthClientConfig
impl Serialize for OAuthClientConfig
impl StructuralPartialEq for OAuthClientConfig
Auto Trait Implementations§
impl Forget for OAuthClientConfig
impl Freeze for OAuthClientConfig
impl Move for OAuthClientConfig
impl RefUnwindSafe for OAuthClientConfig
impl Send for OAuthClientConfigwhere
RawVecInner: Send,
impl Sync for OAuthClientConfigwhere
RawVecInner: Sync,
impl Unpin for OAuthClientConfig
impl UnsafeUnpin for OAuthClientConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for OAuthClientConfigwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.