use serde::{Deserialize, Serialize}; /// Wraps a `String` to store the sub from KC #[derive(Debug, Clone, Serialize, Deserialize)] pub struct KeyCloakSub(pub String); /// database entity to store our users #[derive(Debug, Serialize, Deserialize)] pub struct UserEntity { /// Our unique id of the user, for now this is just the mongodb assigned id pub _id: mongodb::bson::oid::ObjectId, /// Time the user was created pub created_at: mongodb::bson::DateTime, /// KC subject element of the ID Token pub kc_sub: KeyCloakSub, /// User email as provided during signup with the identity provider pub email: String, }