Struct LdapConfigBuilder
pub struct LdapConfigBuilder {
use_ssl: bool,
tls_no_verify: bool,
server_fqdn: String,
base_search_dn: Option<String>,
}Expand description
Builder for LDAP configuration If the search base DN is not set, it will be derived from the server FQDN. Keep in mind that only up, to two domain components will be used starting from the end of the FQDN. For example, for “host.subdomain.example.com”, the base DN will be “dc=example,dc=com”.
Fields§
§use_ssl: bool§tls_no_verify: bool§server_fqdn: String§base_search_dn: Option<String>Implementations§
§impl LdapConfigBuilder
impl LdapConfigBuilder
pub fn new(server_fqdn: impl Into<String>) -> Self
pub fn new(server_fqdn: impl Into<String>) -> Self
Creates a new LdapConfigBuilder with the specified server FQDN. Format: hostname.example.com
fn set_base_search_from_fqdn(self) -> Self
pub fn set_use_ssl(self, use_ssl: bool) -> Self
pub fn set_base_search_dn(self, base_dn: impl Into<String>) -> Self
pub fn set_tls_no_verify(self, tls_no_verify: bool) -> Self
pub async fn build( self, db: GCSharedConfigDatabase, ) -> Result<LdapManager, GCHubRestServerError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LdapConfigBuilder
impl RefUnwindSafe for LdapConfigBuilder
impl Send for LdapConfigBuilder
impl Sync for LdapConfigBuilder
impl Unpin for LdapConfigBuilder
impl UnwindSafe for LdapConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more