pub enum OAuth2Error {
Show 17 variants
InvalidAuthorizationCode,
InvalidRedirectUri,
InvalidClientId,
InvalidClientSecret,
InvalidScope(String),
InvalidAccessToken,
InvalidRefreshToken,
TokenExpired,
AccessDenied(String),
UnsupportedGrantType(String),
UnsupportedResponseType(String),
StateMismatch,
ConfigurationError(String),
RequestError(String),
ParseError(String),
ProviderError(String),
Other(String),
}Expand description
OAuth2 错误类型
Variants§
InvalidAuthorizationCode
无效的授权码
InvalidRedirectUri
无效的重定向 URI
InvalidClientId
无效的客户端 ID
InvalidClientSecret
无效的客户端密钥
InvalidScope(String)
无效的授权范围
InvalidAccessToken
访问令牌无效
InvalidRefreshToken
刷新令牌无效
TokenExpired
令牌已过期
AccessDenied(String)
授权被拒绝
UnsupportedGrantType(String)
不支持的授权类型
UnsupportedResponseType(String)
不支持的响应类型
StateMismatch
状态不匹配
ConfigurationError(String)
配置错误
RequestError(String)
网络请求错误
ParseError(String)
解析错误
ProviderError(String)
提供者错误
Other(String)
其他错误
Trait Implementations§
Source§impl Debug for OAuth2Error
impl Debug for OAuth2Error
Source§impl Display for OAuth2Error
impl Display for OAuth2Error
Source§impl Error for OAuth2Error
impl Error for OAuth2Error
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<Error> for OAuth2Error
impl From<Error> for OAuth2Error
Source§impl From<HttpError> for OAuth2Error
impl From<HttpError> for OAuth2Error
Source§impl From<ParseError> for OAuth2Error
impl From<ParseError> for OAuth2Error
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OAuth2Error
impl RefUnwindSafe for OAuth2Error
impl Send for OAuth2Error
impl Sync for OAuth2Error
impl Unpin for OAuth2Error
impl UnsafeUnpin for OAuth2Error
impl UnwindSafe for OAuth2Error
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