pub struct OAuthScopeEscalationConfig { /* private fields */ }Expand description
Runtime scope-escalation policy for HttpClientTransport.
Implementations§
Source§impl OAuthScopeEscalationConfig
impl OAuthScopeEscalationConfig
Sourcepub fn new(scopes: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn new(scopes: impl IntoIterator<Item = impl Into<String>>) -> Self
Create a policy with the scopes requested for the initial token.
Duplicate and blank scope values are removed while preserving order. By default, at most two challenged retries are permitted per MCP operation.
Sourcepub fn max_attempts(self, max_attempts: usize) -> Self
pub fn max_attempts(self, max_attempts: usize) -> Self
Set the maximum number of challenged retries for one MCP operation.
Set this to zero to surface the first HTTP 403 without reauthorizing.
Sourcepub fn initial_scopes(&self) -> &[String]
pub fn initial_scopes(&self) -> &[String]
Initial scopes tracked by the policy.
Sourcepub fn maximum_attempts(&self) -> usize
pub fn maximum_attempts(&self) -> usize
Maximum challenged retries for one MCP operation.
Trait Implementations§
Source§impl Clone for OAuthScopeEscalationConfig
impl Clone for OAuthScopeEscalationConfig
Source§fn clone(&self) -> OAuthScopeEscalationConfig
fn clone(&self) -> OAuthScopeEscalationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OAuthScopeEscalationConfig
impl Debug for OAuthScopeEscalationConfig
Source§impl Default for OAuthScopeEscalationConfig
impl Default for OAuthScopeEscalationConfig
impl Eq for OAuthScopeEscalationConfig
impl StructuralPartialEq for OAuthScopeEscalationConfig
Auto Trait Implementations§
impl Freeze for OAuthScopeEscalationConfig
impl RefUnwindSafe for OAuthScopeEscalationConfig
impl Send for OAuthScopeEscalationConfig
impl Sync for OAuthScopeEscalationConfig
impl Unpin for OAuthScopeEscalationConfig
impl UnsafeUnpin for OAuthScopeEscalationConfig
impl UnwindSafe for OAuthScopeEscalationConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.