pub enum OAuthError {
InvalidRequest(String),
InvalidClient(String),
InvalidGrant(String),
UnauthorizedClient(String),
UnsupportedGrantType(String),
InvalidScope(String),
ServerError(String),
TemporarilyUnavailable(String),
AccessDenied(String),
UnsupportedResponseType(String),
}Expand description
OAuth error types following RFC 6749.
Variants§
InvalidRequest(String)
The request is missing a required parameter or is otherwise malformed.
InvalidClient(String)
Client authentication failed.
InvalidGrant(String)
The authorization grant or refresh token is invalid.
The client is not authorized to use this grant type.
UnsupportedGrantType(String)
The grant type is not supported.
InvalidScope(String)
The requested scope is invalid or unknown.
ServerError(String)
The authorization server encountered an unexpected condition.
The authorization server is temporarily unavailable.
AccessDenied(String)
Access denied by the resource owner.
UnsupportedResponseType(String)
The response type is not supported.
Implementations§
Source§impl OAuthError
impl OAuthError
Sourcepub fn error_code(&self) -> &'static str
pub fn error_code(&self) -> &'static str
Returns the OAuth error code.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the error description.
Trait Implementations§
Source§impl Clone for OAuthError
impl Clone for OAuthError
Source§fn clone(&self) -> OAuthError
fn clone(&self) -> OAuthError
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 OAuthError
impl Debug for OAuthError
Source§impl Display for OAuthError
impl Display for OAuthError
Source§impl Error for OAuthError
impl Error for OAuthError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<OAuthError> for McpError
impl From<OAuthError> for McpError
Source§fn from(err: OAuthError) -> Self
fn from(err: OAuthError) -> Self
Converts to this type from the input type.
Source§impl From<OAuthError> for OidcError
impl From<OAuthError> for OidcError
Source§fn from(err: OAuthError) -> Self
fn from(err: OAuthError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OAuthError
impl RefUnwindSafe for OAuthError
impl Send for OAuthError
impl Sync for OAuthError
impl Unpin for OAuthError
impl UnwindSafe for OAuthError
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).