Managed to query VirtWeb API
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use basic_jwt::JWTPrivateKey;
|
||||
use clap::Parser;
|
||||
|
||||
/// VirtWeb backend API
|
||||
@ -58,7 +59,7 @@ pub struct AppConfig {
|
||||
|
||||
/// VirtWeb API token private key
|
||||
#[arg(long, env)]
|
||||
pub virtweb_token_private_key: String,
|
||||
virtweb_token_private_key: String,
|
||||
}
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
@ -119,6 +120,13 @@ impl AppConfig {
|
||||
self.oidc_redirect_url
|
||||
.replace("APP_ORIGIN", &self.website_origin)
|
||||
}
|
||||
|
||||
/// Get VirtWeb token private key
|
||||
pub fn token_private_key(&self) -> JWTPrivateKey {
|
||||
JWTPrivateKey::ES384 {
|
||||
r#priv: self.virtweb_token_private_key.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize)]
|
||||
|
Reference in New Issue
Block a user