mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(router): Add new JWT authentication variants and use them (#2835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
21
crates/api_models/src/user.rs
Normal file
21
crates/api_models/src/user.rs
Normal file
@ -0,0 +1,21 @@
|
||||
use common_utils::pii;
|
||||
use masking::Secret;
|
||||
|
||||
#[derive(serde::Deserialize, Debug, Clone, serde::Serialize)]
|
||||
pub struct ConnectAccountRequest {
|
||||
pub email: pii::Email,
|
||||
pub password: Secret<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug, Clone)]
|
||||
pub struct ConnectAccountResponse {
|
||||
pub token: Secret<String>,
|
||||
pub merchant_id: String,
|
||||
pub name: Secret<String>,
|
||||
pub email: pii::Email,
|
||||
pub verification_days_left: Option<i64>,
|
||||
pub user_role: String,
|
||||
//this field is added for audit/debug reasons
|
||||
#[serde(skip_serializing)]
|
||||
pub user_id: String,
|
||||
}
|
||||
Reference in New Issue
Block a user