snops 0.1.0

The snarkops control plane responsible for managing environments and agents
use hmac::{Hmac, Mac};
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use sha2::Sha256;
use snops_common::state::AgentId;

lazy_static! {
    pub static ref JWT_SECRET: Hmac<Sha256> = Hmac::new_from_slice(
        std::env::var("JWT_SECRET")
            .unwrap_or("secret".to_string())
            .as_bytes()
    )
    .unwrap();
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Claims {
    pub id: AgentId,
    pub nonce: u16,
}