Skip to content

Commit

Permalink
feat(axum): Add metadata to IntrospectedUser
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Terstappen committed Sep 5, 2024
1 parent a885b55 commit 45fa9de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axum/introspection/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ pub struct IntrospectedUser {
pub email_verified: Option<bool>,
pub locale: Option<String>,
pub project_roles: Option<HashMap<String, HashMap<String, String>>>,
pub metadata: Option<HashMap<String, String>>,
}

#[async_trait]
Expand Down Expand Up @@ -193,6 +194,7 @@ impl From<ZitadelIntrospectionResponse> for IntrospectedUser {
email_verified: response.extra_fields().email_verified,
locale: response.extra_fields().locale.clone(),
project_roles: response.extra_fields().project_roles.clone(),
metadata: response.extra_fields().metadata.clone(),
}
}
}
Expand Down

0 comments on commit 45fa9de

Please sign in to comment.