aboutsummaryrefslogtreecommitdiffstats
path: root/crates/api-auth/src/discord/mod.rs
blob: a39722d38a97338b8bfcfa6a2178e5fac9805db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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!()
    }
}