- Introduced UserDbService and UserDbServiceImpl for user data handling. - Added UserMapper for converting between User and UserRecord. - Implemented user creation and retrieval in the database. - Updated AuthRepository to include user-related methods. - Enhanced OIDC claims processing to include issuer information. - Created user table in the database with necessary fields and indexes.
15 lines
403 B
Rust
15 lines
403 B
Rust
use async_trait::async_trait;
|
|
|
|
use crate::{adapter::gateway::user_mapper::UserMapper, application::error::auth_error::AuthError};
|
|
|
|
#[async_trait]
|
|
pub trait UserDbService: Send + Sync {
|
|
async fn get_user_by_source_id(
|
|
&self,
|
|
issuer: &str,
|
|
source_id: &str,
|
|
) -> Result<UserMapper, AuthError>;
|
|
|
|
async fn create_user(&self, user: UserMapper) -> Result<i32, AuthError>;
|
|
}
|