mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
feat(users): setup user authentication methods schema and apis (#4999)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Mani Chandra Dulam <mani.dchandra@juspay.in>
This commit is contained in:
@ -13,7 +13,10 @@ use crate::{
|
||||
authentication::{AuthToken, UserFromToken},
|
||||
authorization::roles::RoleInfo,
|
||||
},
|
||||
types::domain::{self, MerchantAccount, UserFromStorage},
|
||||
types::{
|
||||
domain::{self, MerchantAccount, UserFromStorage},
|
||||
transformers::ForeignFrom,
|
||||
},
|
||||
};
|
||||
|
||||
pub mod dashboard_metadata;
|
||||
@ -200,3 +203,13 @@ pub fn get_redis_connection(state: &SessionState) -> UserResult<Arc<RedisConnect
|
||||
.change_context(UserErrors::InternalServerError)
|
||||
.attach_printable("Failed to get redis connection")
|
||||
}
|
||||
|
||||
impl ForeignFrom<user_api::AuthConfig> for common_enums::UserAuthType {
|
||||
fn foreign_from(from: user_api::AuthConfig) -> Self {
|
||||
match from {
|
||||
user_api::AuthConfig::OpenIdConnect { .. } => Self::OpenIdConnect,
|
||||
user_api::AuthConfig::Password => Self::Password,
|
||||
user_api::AuthConfig::MagicLink => Self::MagicLink,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user