pub struct OAuth2Client {
pub provider_config: ProviderConfig,
/* private fields */
}Expand description
Production-grade OAuth2 client wrapper supporting all modern flows
Fields§
§provider_config: ProviderConfigProvider-specific configuration
Implementations§
Source§impl OAuth2Client
impl OAuth2Client
Sourcepub fn new(
config: &OAuth2Config,
provider_type: ProviderType,
) -> McpResult<Self>
pub fn new( config: &OAuth2Config, provider_type: ProviderType, ) -> McpResult<Self>
Create a proven OAuth2 client supporting all flows
Sourcepub fn auth_code_client(&self) -> &BasicClient
pub fn auth_code_client(&self) -> &BasicClient
Get access to the authorization code client
Sourcepub fn client_credentials_client(&self) -> Option<&BasicClient>
pub fn client_credentials_client(&self) -> Option<&BasicClient>
Get access to the client credentials client (if available)
Sourcepub fn device_code_client(&self) -> Option<&BasicClient>
pub fn device_code_client(&self) -> Option<&BasicClient>
Get access to the device code client (if available)
Sourcepub fn provider_config(&self) -> &ProviderConfig
pub fn provider_config(&self) -> &ProviderConfig
Get the provider configuration
Trait Implementations§
Source§impl Clone for OAuth2Client
impl Clone for OAuth2Client
Source§fn clone(&self) -> OAuth2Client
fn clone(&self) -> OAuth2Client
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 moreAuto Trait Implementations§
impl Freeze for OAuth2Client
impl RefUnwindSafe for OAuth2Client
impl Send for OAuth2Client
impl Sync for OAuth2Client
impl Unpin for OAuth2Client
impl UnwindSafe for OAuth2Client
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