mirror of
https://codeberg.org/icewind/rss-webhook-trigger.git
synced 2026-11-30 04:00:49 +01:00
add option for serving jwt info
This commit is contained in:
parent
766a820f96
commit
c04a04ea29
8 changed files with 256 additions and 22 deletions
11
src/error.rs
11
src/error.rs
|
|
@ -1,3 +1,4 @@
|
|||
use secretfile::SecretError;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use thiserror::Error;
|
||||
|
|
@ -65,6 +66,8 @@ pub enum FetchError {
|
|||
pub enum JwtError {
|
||||
#[error("No JWT secret configured")]
|
||||
NoSecret,
|
||||
#[error("Error reading secret: {0}")]
|
||||
Load(#[from] SecretError),
|
||||
#[error("Error loading JWT secret: {0}")]
|
||||
DecodeKey(#[from] jsonwebtoken::errors::Error),
|
||||
}
|
||||
|
|
@ -76,3 +79,11 @@ pub enum TriggerError {
|
|||
#[error(transparent)]
|
||||
Jwt(#[from] JwtError),
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ServeJwtError {
|
||||
#[error(transparent)]
|
||||
Jwt(#[from] JwtError),
|
||||
#[error(transparent)]
|
||||
Io(#[from] std::io::Error),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue