use axum::Json;
use serde::Serialize;
#[derive(Debug, Serialize)]
pub(in crate::commands::serve) struct Principal {
sub: &'static str,
principal_type: &'static str,
email: &'static str,
display_name: &'static str,
prefix: Option<&'static str>,
scopes: Vec<&'static str>,
expires_at: Option<&'static str>,
}
pub(in crate::commands::serve) async fn get_me() -> Json<Principal> {
Json(Principal {
sub: "local-anonymous",
principal_type: "service_account",
email: "local@boxlite.local",
display_name: "Local development",
prefix: None,
scopes: vec![
"box:read",
"box:write",
"box:exec",
"box:delete",
"image:read",
"image:write",
"snapshot:read",
"snapshot:write",
"snapshot:delete",
"me:read",
],
expires_at: None,
})
}