From f06288f156ccb8f9ebf35782a179bf57e6bc8fc2 Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Fri, 10 Apr 2026 23:48:24 +0200 Subject: feat(auth): get user --- crates/api-auth/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'crates/api-auth/src/lib.rs') diff --git a/crates/api-auth/src/lib.rs b/crates/api-auth/src/lib.rs index 85fdb01..815b170 100644 --- a/crates/api-auth/src/lib.rs +++ b/crates/api-auth/src/lib.rs @@ -1,6 +1,8 @@ #[cfg(feature = "discord")] pub mod discord; +pub mod client; + mod error; use api_core::auth::AuthClientConfig; use api_core::models::user::User; @@ -21,8 +23,12 @@ pub struct BasicClient(C); #[async_trait::async_trait] pub trait OauthDriver: Send + Sync { - async fn get_auth_token(&self) -> Result; - async fn get_user(&self) -> Result; + async fn get_user( + &self, + client: &client::AuthHttpClient, + code: &str, + ) -> Result; + async fn validate_session(&self, cookie: &str, state: &str) -> Result<(), AuthError>; async fn create_oauth_session(&self) -> Result; async fn save_session(&self, user: &User) -> Result<(), AuthError>; } -- cgit v1.2.3