#[non_exhaustive]pub enum JwtSvidError {
InvalidSubject(SpiffeIdError),
MissingKeyId,
InvalidTyp,
UnsupportedAlgorithm,
RequiredClaimMissing(String),
BundleNotFound(TrustDomain),
AuthorityNotFound(String),
InvalidAudience(Vec<String>, Vec<String>),
InvalidToken(Error),
Other(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
An error that can arise trying to parse a JwtSvid
from a JWT token. It also represents
errors that can happen validating the token signature or the token audience.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidSubject(SpiffeIdError)
The ‘sub’ claim is not a valid SPIFFE ID.
MissingKeyId
The header ‘kid’ is not present.
InvalidTyp
The header ‘typ’ contains a value other than ‘JWT’ or ‘JOSE’.
UnsupportedAlgorithm
The header ‘alg’ contains an algorithm that is not supported. Supported algorithms are [‘RS256’, ‘RS384’, ‘RS512’, ‘ES256’, ‘ES384’, ‘PS256’, ‘PS384’, ‘PS512’].
RequiredClaimMissing(String)
One of the required claims is missing. “aud”, “sub” and “exp” must be present.
BundleNotFound(TrustDomain)
Cannot find a JWT bundle for the trust domain, to validate the token signature.
AuthorityNotFound(String)
Cannot find the JWT authority with key_id, to validate the token signature.
InvalidAudience(Vec<String>, Vec<String>)
The token doesn’t have the expected audience.
InvalidToken(Error)
Error returned by the JWT decoding library.
Other(Box<dyn Error + Send + Sync + 'static>)
Other errors that can arise.
Trait Implementations§
Source§impl Debug for JwtSvidError
impl Debug for JwtSvidError
Source§impl Display for JwtSvidError
impl Display for JwtSvidError
Source§impl Error for JwtSvidError
impl Error for JwtSvidError
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
Source§impl From<Error> for JwtSvidError
impl From<Error> for JwtSvidError
Source§impl From<JwtSvidError> for GrpcClientError
impl From<JwtSvidError> for GrpcClientError
Source§fn from(source: JwtSvidError) -> Self
fn from(source: JwtSvidError) -> Self
Source§impl From<SpiffeIdError> for JwtSvidError
impl From<SpiffeIdError> for JwtSvidError
Source§fn from(source: SpiffeIdError) -> Self
fn from(source: SpiffeIdError) -> Self
Auto Trait Implementations§
impl Freeze for JwtSvidError
impl !RefUnwindSafe for JwtSvidError
impl Send for JwtSvidError
impl Sync for JwtSvidError
impl Unpin for JwtSvidError
impl !UnwindSafe for JwtSvidError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request