mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
feat(users): Add email domain based restriction for dashboard entry APIs (#6940)
This commit is contained in:
@ -305,18 +305,26 @@ pub struct CreateUserAuthenticationMethodRequest {
|
||||
pub owner_type: common_enums::Owner,
|
||||
pub auth_method: AuthConfig,
|
||||
pub allow_signup: bool,
|
||||
pub email_domain: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct UpdateUserAuthenticationMethodRequest {
|
||||
pub id: String,
|
||||
// TODO: When adding more fields make config and new fields option
|
||||
pub auth_method: AuthConfig,
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum UpdateUserAuthenticationMethodRequest {
|
||||
AuthMethod {
|
||||
id: String,
|
||||
auth_config: AuthConfig,
|
||||
},
|
||||
EmailDomain {
|
||||
owner_id: String,
|
||||
email_domain: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct GetUserAuthenticationMethodsRequest {
|
||||
pub auth_id: String,
|
||||
pub auth_id: Option<String>,
|
||||
pub email_domain: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize, serde::Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user