Skip to main content

LdapAccountsConfigSetters

Trait LdapAccountsConfigSetters 

Source
pub trait LdapAccountsConfigSetters: Holds<LdapAccountsConfig> + Sized {
Show 16 methods // Required methods fn url(self, value: impl Into<String>) -> Self; fn start_tls(self, value: bool) -> Self; fn ca_file(self, value: impl Into<Option<String>>) -> Self; fn base(self, value: impl Into<String>) -> Self; fn bind(self, value: impl Into<Option<String>>) -> Self; fn bind_password(self, value: impl Into<Option<Secret<String>>>) -> Self; fn user_filter(self, value: impl Into<String>) -> Self; fn object_filter(self, value: impl Into<String>) -> Self; fn allow_filter_lookups(self, value: bool) -> Self; fn name_attribute(self, value: impl Into<String>) -> Self; fn group_attribute(self, value: impl Into<String>) -> Self; fn group_filter(self, value: impl Into<Option<String>>) -> Self; fn group_base(self, value: impl Into<Option<String>>) -> Self; fn nested_groups(self, value: bool) -> Self; fn timeout_seconds(self, value: u32) -> Self; fn cache(self, value: impl Into<CacheSetting>) -> Self;
}
Expand description

The typed setters of LdapAccountsConfig, for any builder that holds its settings.

Required Methods§

Source

fn url(self, value: impl Into<String>) -> Self

LDAP or LDAPS server URL.

Source

fn start_tls(self, value: bool) -> Self

Start TLS on an LDAP connection before sending credentials.

Source

fn ca_file(self, value: impl Into<Option<String>>) -> Self

Optional PEM file with the only trusted server roots.

Source

fn base(self, value: impl Into<String>) -> Self

Base distinguished name used for searches.

Source

fn bind(self, value: impl Into<Option<String>>) -> Self

Service-account distinguished name used for searches.

Source

fn bind_password(self, value: impl Into<Option<Secret<String>>>) -> Self

Service-account password; wiped when dropped and never shown.

Source

fn user_filter(self, value: impl Into<String>) -> Self

LDAP filter with {name} for the escaped account name.

Source

fn object_filter(self, value: impl Into<String>) -> Self

The filter every account a filter lookup may find matches, which the lookup’s filter is AND-ed with so it can only narrow it. It must carry every restriction an account must meet to sign in here (people, not computer or service accounts; an organisational unit; a group): user_filter is not applied to a filter lookup, as it is built around a name. The default is people, not Active Directory computer accounts.

Source

fn allow_filter_lookups(self, value: bool) -> Self

Whether a lookup by: "filter" is answered. Off by default: a filter is built only by a matcher’s rule, with its values escaped, and a directory with no such rule has no reason to take one. Anything that can make a lookup by: "filter" with its own text can search the directory, so turn this on only where the lookups come from a matcher.

Source

fn name_attribute(self, value: impl Into<String>) -> Self

Attribute containing the directory’s canonical account name.

Source

fn group_attribute(self, value: impl Into<String>) -> Self

Attribute containing group distinguished names; empty disables direct groups.

Source

fn group_filter(self, value: impl Into<Option<String>>) -> Self

Optional filter template with {dn} for groups containing the account.

Source

fn group_base(self, value: impl Into<Option<String>>) -> Self

Optional base for group searches; defaults to base.

Source

fn nested_groups(self, value: bool) -> Self

Read nested groups with Active Directory’s matching rule.

Source

fn timeout_seconds(self, value: u32) -> Self

Connection and operation timeout in seconds; values below one become one.

Source

fn cache(self, value: impl Into<CacheSetting>) -> Self

Lookups kept for a few seconds, to absorb bursts: true (5 s, 1 s for “not found”, 10 000 entries), false, or { "ttl", "negative_ttl", "max_entries" } (durations read 5, 1.5, 5s or 250ms). Passwords are always checked at the directory.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<__B> LdapAccountsConfigSetters for __B
where __B: Holds<LdapAccountsConfig>,