pub enum PresentationAuthError {
Wire(WireError),
NonceLength,
Challenge(ChallengeError),
Resolve(CredentialError),
Denied(Denied),
PolicyDenied {
reason: String,
},
Policy(OrgError),
}Expand description
Errors from authenticate_presentation (thiserror, exhaustive).
Variants§
Wire(WireError)
The Auths-Presentation wire shape was malformed.
NonceLength
The presented nonce was not exactly 32 bytes.
Challenge(ChallengeError)
No live single-use challenge matched (absent, replayed, or expired).
Resolve(CredentialError)
The issuer/subject KELs or the credential could not be resolved.
Denied(Denied)
The presentation verified-as-a-process but was not honored (see the inner reason).
PolicyDenied
The presentation verified and the holder is authenticated, but the issuer’s org policy denied the principal (403, not 401 — authentication succeeded).
Policy(OrgError)
The issuer’s org policy could not be loaded or evaluated — fail closed (treated as a denial; the principal is not authorized when policy cannot be confirmed).
Implementations§
Source§impl PresentationAuthError
impl PresentationAuthError
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
The HTTP status: 400 for a malformed request, 403 for insufficient capability or a policy denial, else 401.
Trait Implementations§
Source§impl Debug for PresentationAuthError
impl Debug for PresentationAuthError
Source§impl Display for PresentationAuthError
impl Display for PresentationAuthError
Source§impl Error for PresentationAuthError
impl Error for PresentationAuthError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for PresentationAuthError
impl !UnwindSafe for PresentationAuthError
impl Freeze for PresentationAuthError
impl Send for PresentationAuthError
impl Sync for PresentationAuthError
impl Unpin for PresentationAuthError
impl UnsafeUnpin for PresentationAuthError
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
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> Pointable for T
impl<T> Pointable for T
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.