pub struct AuthError {
pub message: String,
pub code: String,
pub status_code: Option<u16>,
}Fields§
§message: String§code: String§status_code: Option<u16>Implementations§
Source§impl AuthError
Convenience predicates for the common error categories.
These check the code field so callers can pattern-match on OAuth error
codes without string comparisons.
impl AuthError
Convenience predicates for the common error categories.
These check the code field so callers can pattern-match on OAuth error
codes without string comparisons.
pub fn is_invalid_client(&self) -> bool
pub fn is_invalid_scope(&self) -> bool
pub fn is_invalid_grant(&self) -> bool
pub fn is_unsupported_grant_type(&self) -> bool
pub fn is_invalid_request(&self) -> bool
Sourcepub fn is_access_denied(&self) -> bool
pub fn is_access_denied(&self) -> bool
access_denied — the AS refused the request on policy grounds.
On a cross-client token exchange this means the exchanging client
is not allowlisted on the target Resource; the operator has to add
it (PATCH /admin/resources/{id} with
policy.exchange.allowed_client_ids). Re-prompting the user does
not help, which is what separates it from consent_required.
Sourcepub fn is_invalid_target(&self) -> bool
pub fn is_invalid_target(&self) -> bool
invalid_target (RFC 8707 §2.2) — the resource parameter does
not match a granted resource byte for byte (a trailing slash is
enough).
pub fn is_server_error(&self) -> bool
pub fn is_circuit_open(&self) -> bool
Trait Implementations§
impl Eq for AuthError
Source§impl Error for AuthError
impl Error for AuthError
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<AuthError> for AuthplaneError
impl From<AuthError> for AuthplaneError
impl StructuralPartialEq for AuthError
Auto Trait Implementations§
impl Freeze for AuthError
impl RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnsafeUnpin for AuthError
impl UnwindSafe for AuthError
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: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.