diff options
Diffstat (limited to 'crates/api-auth/src/discord/mod.rs')
| -rw-r--r-- | crates/api-auth/src/discord/mod.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/api-auth/src/discord/mod.rs b/crates/api-auth/src/discord/mod.rs new file mode 100644 index 0000000..a39722d --- /dev/null +++ b/crates/api-auth/src/discord/mod.rs @@ -0,0 +1,30 @@ +use api_core::models::user::User; +use async_trait::async_trait; +use sqlx::PgPool; + +use crate::{BasicClient, OauthDriver, error::AuthError}; + +#[derive(Clone, Debug)] +pub struct AuthServiceDiscord { + database: PgPool, + client: BasicClient, +} + +impl AuthServiceDiscord { + pub fn new(database: PgPool, client: BasicClient) -> Self { + Self { database, client } + } +} + +#[async_trait] +impl OauthDriver for AuthServiceDiscord { + async fn get_auth_token(&self) -> Result<String, AuthError> { + todo!() + } + async fn get_user(&self) -> Result<User, AuthError> { + todo!() + } + async fn create_session(&self, _user: &User) { + todo!() + } +} |
