pub enum DpopError {
UnexpectedOAuthError {
error: String,
},
MissingDpopNonceHeader,
TokenMintingFailed(Error),
HeaderCreationFailed(InvalidHeaderValue),
ResponseBodyParsingFailed(Error),
ResponseBodyObjectParsingFailed,
}
Expand description
Represents errors that can occur during DPoP (Demonstration of Proof-of-Possession) operations.
These errors occur when creating, validating, or using DPoP proofs for OAuth security.
Variants§
UnexpectedOAuthError
Error when server returns an unexpected OAuth error.
This error occurs when the server returns an OAuth error other than the expected “use_dpop_nonce” error during DPoP nonce handling.
MissingDpopNonceHeader
Error when DPoP-Nonce header is missing from server response.
This error occurs when the server indicates that a DPoP nonce is required but fails to include the DPoP-Nonce header in the response.
TokenMintingFailed(Error)
Error when DPoP token minting fails.
This error occurs when the system fails to create (mint) a DPoP proof token, typically due to cryptographic key issues or claim validation problems.
HeaderCreationFailed(InvalidHeaderValue)
Error when HTTP header creation fails.
This error occurs when the DPoP proof token cannot be converted into a valid HTTP header value, typically due to invalid characters.
ResponseBodyParsingFailed(Error)
Error when response body JSON parsing fails.
This error occurs when the server response body cannot be properly parsed as JSON, typically due to malformed content or network issues.
ResponseBodyObjectParsingFailed
Error when response body is not a valid JSON object.
This error occurs when the server response body is valid JSON but not in the expected object format for OAuth error responses.
Trait Implementations§
Source§impl Error for DpopError
impl Error for DpopError
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
Auto Trait Implementations§
impl Freeze for DpopError
impl !RefUnwindSafe for DpopError
impl Send for DpopError
impl Sync for DpopError
impl Unpin for DpopError
impl !UnwindSafe for DpopError
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.