diff options
| author | rtkay123 <dev@kanjala.com> | 2026-04-04 10:51:18 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-04-04 10:51:18 +0200 |
| commit | 19c25138f88acf19c9a959a58de4f58e54026ebc (patch) | |
| tree | bd854f20c539770a92fb451503b4c6d132c110a6 /crates/api-auth/src/discord/mod.rs | |
| parent | 41d90f42c37df06dabfd717d19f3dc72b5ba2d11 (diff) | |
| download | sellershut-19c25138f88acf19c9a959a58de4f58e54026ebc.tar.bz2 sellershut-19c25138f88acf19c9a959a58de4f58e54026ebc.zip | |
feat: connect to db
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!() + } +} |
