⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

LdapAdClient

Struct LdapAdClient 

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

Active Directory LDAP client wrapper.

Provides AD-specific operations like user lookup by sAMAccountName, group membership extraction, and bind-based authentication.

Implementations§

Source§

impl LdapAdClient

Source

pub fn new(domain: &str, base_dn: &str) -> Self

Create a new AD client for the given domain and base DN.

Source

pub fn client(&self) -> &LdapClient

Get a reference to the underlying LDAP client.

Source

pub fn client_mut(&mut self) -> &mut LdapClient

Get a mutable reference to the underlying LDAP client.

Source

pub fn user_filter(username: &str) -> LdapFilter

Build a user search filter for sAMAccountName.

Source

pub fn search_user(&mut self, username: &str) -> Vec<u8>

Encode a search request for a specific user by sAMAccountName.

Source

pub fn authenticate_user(&mut self, username: &str, password: &str) -> Vec<u8>

Encode a bind request for user authentication.

Uses the UPN format: username@domain.

Source

pub fn groups_filter(user_dn: &str) -> LdapFilter

Build a filter to find groups for a user DN.

Source

pub fn get_groups(&mut self, user_dn: &str) -> Vec<u8>

Encode a search request for groups containing the given user DN.

Source

pub fn extract_groups(entry: &SearchEntry) -> Vec<String>

Extract group names from the memberOf attribute of a search entry.

Auto Trait Implementations§

§

impl Freeze for LdapAdClient

§

impl RefUnwindSafe for LdapAdClient

§

impl Send for LdapAdClient

§

impl Sync for LdapAdClient

§

impl Unpin for LdapAdClient

§

impl UnwindSafe for LdapAdClient

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.