Skip to main content

LdapAccounts

Struct LdapAccounts 

Source
pub struct LdapAccounts { /* private fields */ }
Expand description

LDAP accounts as authentication and directory providers, with lookups kept as the configuration’s cache says.

Implementations§

Source§

impl LdapAccounts

Source

pub fn new(config: LdapAccountsConfig) -> Result<Self, String>

Validates the LDAP configuration without opening a network connection.

§Errors

Returns an error for unsafe transport, incomplete credentials, invalid filters, or a ca_file that cannot be read.

Source

pub fn non_defaults(&self) -> &[NonDefault]

What the TLS configuration for ca_file allows beyond coqui-peer-tls’s default policy (TLS 1.2 and 1.3), as data for the host to act on. Empty without a ca_file, where ldap3’s own rustls defaults apply.

Source

pub fn cache(&self) -> CacheOptions

How lookups are kept.

Trait Implementations§

Source§

impl Authenticator for LdapAccounts

Source§

fn authenticate(&self, attempt: Attempt) -> Result<Verdict, ProviderError>

Checks one attempt without returning person details or credential material. Read more
§

fn describe(&self) -> Result<Description, ProviderError>

What this authenticator is and what it takes. Defaults to nothing said.
Source§

impl Debug for LdapAccounts

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Directory for LdapAccounts

Source§

fn lookup(&self, lookup: Lookup) -> Result<Option<Person>, ProviderError>

Returns the person for lookup, or None when the reference is unknown or the account is disabled.
§

fn describe(&self) -> Result<Description, ProviderError>

What this directory is. Defaults to nothing said.
Source§

impl ProviderDecl for LdapAccounts

Source§

const KINDS: &'static [&'static str]

The name of every kind this provider serves, so a library can declare them at compile time.
Source§

fn provider(host: Host, alloc: Alloc) -> Result<ProviderParts, ValueError>

Builds this provider’s descriptor, its tables and its configuration schema, once. host is what the library was loaded by; alloc is what the schema is built through.
Source§

impl TryFrom<Described<LdapAccountsConfig>> for LdapAccounts

Source§

type Error = ProviderError

The type returned in the event of a conversion error.
Source§

fn try_from(config: Described<LdapAccountsConfig>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<LdapAccountsConfig> for LdapAccounts

Source§

type Error = ProviderError

The type returned in the event of a conversion error.
Source§

fn try_from(config: LdapAccountsConfig) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.