pub enum LicenseError {
Io(Error),
MalformedJwt(String),
BadHeader(String),
BadPayload(String),
BadSignature,
Truncated {
actual: usize,
},
ClockSkew {
iat_seconds: i64,
now_seconds: i64,
tolerance_seconds: i64,
},
}Expand description
Errors returned by load_and_verify when the license material is present
but malformed (vs simply missing, which is reported via LicenseStatus::Missing).
Variants§
Io(Error)
I/O error reading the license file.
MalformedJwt(String)
JWT structure was not three base64url-encoded segments.
BadHeader(String)
Header could not be parsed as JSON or had wrong alg.
BadPayload(String)
Payload could not be parsed as LicenseClaims.
BadSignature
Signature verification failed.
Truncated
JWT length looks truncated (typical valid range 700-1500 chars).
ClockSkew
The license JWT’s iat claim is more than the configured tolerance in
the future relative to the local clock. Mathematically equivalent to
“the local clock is more than the tolerance behind the license issue
time”; the two interpretations are the same condition.
Tolerance is applied only to iat, not to exp. The existing grace
ladder (7 / 30 / hard-fail) absorbs sub-day exp skew. This is a
deliberate asymmetry; revisit if a real incident shows otherwise.
Trait Implementations§
Source§impl Debug for LicenseError
impl Debug for LicenseError
Source§impl Display for LicenseError
impl Display for LicenseError
Source§impl Error for LicenseError
impl Error for LicenseError
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()