use serde::Serialize;
use bitrouter_sdk::PipelineEvent;
#[derive(Debug, Clone, Serialize)]
pub struct Authenticated {
pub api_key_id: String,
pub user_id: String,
pub policy_id: Option<String>,
}
impl PipelineEvent for Authenticated {
fn event_name(&self) -> &'static str {
"auth.authenticated"
}
}
#[derive(Debug, Clone, Serialize)]
pub struct ApiPrincipalEstablished {
pub route_scope_id: String,
}
impl PipelineEvent for ApiPrincipalEstablished {
fn event_name(&self) -> &'static str {
"auth.api_principal_established"
}
}