pub struct Resolver<I>
where I: IdProvider + Sync,
{ /* private fields */ }

Implementations§

source§

impl<I> Resolver<I>
where I: IdProvider + Sync,

source

pub async fn new( db: Db, client: I, hsm: BoxedDynTpm, machine_key: MachineKey, timeout_seconds: u64, pam_allow_groups: Vec<String>, default_shell: String, home_prefix: String, home_attr: HomeAttr, home_alias: Option<HomeAttr>, uid_attr_map: UidAttr, gid_attr_map: UidAttr, allow_id_overrides: Vec<String> ) -> Result<Self, ()>

source

pub async fn attempt_online(&self)

source

pub async fn mark_offline(&self)

source

pub async fn clear_cache(&self) -> Result<(), ()>

source

pub async fn invalidate(&self) -> Result<(), ()>

source

pub async fn check_nxcache(&self, id: &Id) -> Option<SystemTime>

source

pub async fn reload_nxset(&self, iter: impl Iterator<Item = (String, u32)>)

source

pub async fn check_nxset(&self, name: &str, idnumber: u32) -> bool

source

pub async fn get_sshkeys(&self, account_id: &str) -> Result<Vec<String>, ()>

source

pub async fn get_nssaccounts(&self) -> Result<Vec<NssUser>, ()>

source

pub async fn get_nssaccount_name( &self, account_id: &str ) -> Result<Option<NssUser>, ()>

source

pub async fn get_nssaccount_gid(&self, gid: u32) -> Result<Option<NssUser>, ()>

source

pub async fn get_nssgroups(&self) -> Result<Vec<NssGroup>, ()>

source

pub async fn get_nssgroup_name( &self, grp_id: &str ) -> Result<Option<NssGroup>, ()>

source

pub async fn get_nssgroup_gid(&self, gid: u32) -> Result<Option<NssGroup>, ()>

source

pub async fn pam_account_allowed( &self, account_id: &str ) -> Result<Option<bool>, ()>

source

pub async fn pam_account_authenticate_init( &self, account_id: &str ) -> Result<(AuthSession, PamAuthResponse), ()>

source

pub async fn pam_account_authenticate_step( &self, auth_session: &mut AuthSession, pam_next_req: PamAuthRequest ) -> Result<PamAuthResponse, ()>

source

pub async fn pam_account_authenticate( &self, account_id: &str, password: &str ) -> Result<Option<bool>, ()>

source

pub async fn pam_account_beginsession( &self, account_id: &str ) -> Result<Option<HomeDirectoryInfo>, ()>

source

pub async fn test_connection(&self) -> bool

Auto Trait Implementations§

§

impl<I> !RefUnwindSafe for Resolver<I>

§

impl<I> Send for Resolver<I>
where I: Send,

§

impl<I> Sync for Resolver<I>

§

impl<I> Unpin for Resolver<I>
where I: Unpin,

§

impl<I> !UnwindSafe for Resolver<I>

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
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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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.
source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more