@@ -348,6 +348,28 @@ pub struct UserListParameters {
348348 /// Filter users by the federated unique ID.
349349 #[ validate( length( max = 64 ) ) ]
350350 pub unique_id : Option < String > ,
351+
352+ /// Filter users by User Type (local, federated, nonlocal, all).
353+ #[ serde( default , rename = "type" ) ]
354+ pub user_type : Option < UserType > ,
355+ }
356+
357+ /// User type for filtering.
358+ #[ derive( Clone , Copy , Debug , Default , Deserialize , PartialEq , Eq , Hash , Serialize , ToSchema ) ]
359+ #[ serde( rename_all = "lowercase" ) ]
360+ pub enum UserType {
361+ /// Local users only (with passwords).
362+ Local ,
363+
364+ /// Federated users only (authenticated via external IdP).
365+ Federated ,
366+
367+ /// Non-local users (users without local authentication).
368+ NonLocal ,
369+
370+ /// All users (default behavior).
371+ #[ default]
372+ All ,
351373}
352374
353375impl From < UserListParameters > for identity_types:: UserListParameters {
@@ -356,7 +378,19 @@ impl From<UserListParameters> for identity_types::UserListParameters {
356378 domain_id : value. domain_id ,
357379 name : value. name ,
358380 unique_id : value. unique_id ,
381+ user_type : value. user_type . map ( Into :: into) ,
359382 // limit: value.limit,
360383 }
361384 }
362385}
386+
387+ impl From < UserType > for identity_types:: UserType {
388+ fn from ( value : UserType ) -> Self {
389+ match value {
390+ UserType :: Local => identity_types:: UserType :: Local ,
391+ UserType :: Federated => identity_types:: UserType :: Federated ,
392+ UserType :: NonLocal => identity_types:: UserType :: NonLocal ,
393+ UserType :: All => identity_types:: UserType :: All ,
394+ }
395+ }
396+ }
0 commit comments