pub struct OAuthAuthCodeConfig {
pub client_id: Option<String>,
pub client_secret: Option<String>,
pub callback_port: Option<u16>,
pub refresh_buffer: Duration,
pub http_client: Option<Client>,
pub challenge: Option<OAuthBearerChallenge>,
pub preferred_authorization_server: Option<String>,
}Expand description
Configuration for OAuthAuthorizationCode.
Fields§
§client_id: Option<String>OAuth client ID. Default: "tower-mcp".
client_secret: Option<String>OAuth client secret (if the server requires it).
callback_port: Option<u16>Port for the local callback server. Default: random available port.
refresh_buffer: DurationBuffer before token expiry to trigger refresh. Default: 30 seconds.
http_client: Option<Client>Custom reqwest client.
challenge: Option<OAuthBearerChallenge>Bearer challenge already obtained from the protected resource.
When omitted, the client probes server_url before falling back to
well-known discovery.
Exact issuer to select when Protected Resource Metadata advertises multiple authorization servers. The first advertised server is used when this is omitted.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OAuthAuthCodeConfig
impl !UnwindSafe for OAuthAuthCodeConfig
impl Freeze for OAuthAuthCodeConfig
impl Send for OAuthAuthCodeConfig
impl Sync for OAuthAuthCodeConfig
impl Unpin for OAuthAuthCodeConfig
impl UnsafeUnpin for OAuthAuthCodeConfig
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