File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ edition = "2021"
1414
1515[dependencies ]
1616deadpool = { version = " 0.12.2" , optional = true }
17+ derive_more = { version = " 2.0.1" , features = [" debug" ] }
1718futures = " 0.3.31"
1819ldap3 = { version = " 0.11.5" , default-features = false }
1920serde = { version = " 1.0.214" , features = [" derive" ] }
Original file line number Diff line number Diff line change @@ -100,23 +100,28 @@ pub extern crate ldap3;
100100const LDAP_ENTRY_DN : & str = "entryDN" ;
101101const NO_SUCH_RECORD : u32 = 32 ;
102102
103+
103104/// Configuration and authentication for LDAP connection
104- #[ derive( Clone ) ]
105+ #[ derive( derive_more :: Debug , Clone ) ]
105106pub struct LdapConfig {
106107 pub ldap_url : Url ,
107108 /// DistinguishedName, aka the "username" to use for the connection.
108109 pub bind_dn : String ,
110+ #[ debug( skip) ] // We don't want to print passwords.
109111 pub bind_password : String ,
110112 pub dn_attribute : Option < String > ,
111113 /// Low level configuration for the connection.
112114 /// You can probably skip it.
115+ #[ debug( skip) ] // Debug omitted, because it just doesn't implement it.
113116 pub connection_settings : Option < LdapConnSettings > ,
114117}
115118
119+
116120///
117121/// High-level LDAP client wrapper ontop of ldap3 crate. This wrapper provides a high-level interface to perform LDAP operations
118122/// including authentication, search, update, delete
119123///
124+ #[ derive( Debug , Clone ) ]
120125pub struct LdapClient {
121126 /// The internal connection handle.
122127 ldap : Ldap ,
You can’t perform that action at this time.
0 commit comments