mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 15:12:23 +00:00
user: Add name to app token
This commit is contained in:
@@ -34,6 +34,12 @@ impl ValueSerialize for PrincipalType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct AppToken {
|
||||
pub name: String,
|
||||
pub token: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
// TODO: Rename this to Principal
|
||||
@@ -44,7 +50,7 @@ pub struct User {
|
||||
pub principal_type: PrincipalType,
|
||||
pub password: Option<String>,
|
||||
#[serde(default)]
|
||||
pub app_tokens: Vec<String>,
|
||||
pub app_tokens: Vec<AppToken>,
|
||||
#[serde(default)]
|
||||
pub memberships: Vec<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user