feat: add many things

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-03-08 23:00:03 +01:00
parent 45353089c2
commit 5a5f9a3003
104 changed files with 23417 additions and 2027 deletions

View File

@@ -20,6 +20,14 @@ pub struct User {
pub emails: Vec<UserEmail>,
}
/// Public user profile (no emails).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserProfile {
pub user_id: String,
pub username: String,
pub created_at: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UserEmail {
pub email: String,
@@ -91,6 +99,12 @@ pub trait ForestAuth: Send + Sync {
async fn get_user(&self, access_token: &str) -> Result<User, AuthError>;
async fn get_user_by_username(
&self,
access_token: &str,
username: &str,
) -> Result<UserProfile, AuthError>;
async fn list_tokens(
&self,
access_token: &str,