pub enum SourceError {
Refused(Refusal),
Unavailable(String),
}Expand description
Why no claims could be established for a presented token.
Two kinds, and the distinction is the one a client cannot recover from either: a token that was refused is refused, and a token whose validity could not be determined is in a different position. Reporting the second as the first sends a caller to re-authenticate against an authorization server that was merely unreachable, and reports a client’s credentials as bad when they were never wrong.
Variants§
Refused(Refusal)
The authorization server, or this crate’s own rules, refused the token.
The authorization server could not be asked, or its answer was not readable.
Carries a reason for the log and nothing else. It must never carry the token: this type is the first place a token could end up in a message somebody pastes into a bug report.
Trait Implementations§
Source§impl Clone for SourceError
impl Clone for SourceError
Source§impl Debug for SourceError
impl Debug for SourceError
Source§impl Display for SourceError
impl Display for SourceError
impl Eq for SourceError
Source§impl Error for SourceError
impl Error for SourceError
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()