Struct winauth::windows::NtlmSspi

source ·
pub struct NtlmSspi { /* private fields */ }
Expand description

Either perform single-sign-on using NTLM (performing a login with the current windows identity) or validate incoming auth requests

§Warning

Using target_spn or/and channel_bindings is RECOMMENDED for security purposes!

Implementations§

source§

impl NtlmSspi

source

pub fn client_identity(&mut self) -> Result<String>

Fetch the authenticated client identity (e.g. domain\username)

Trait Implementations§

source§

impl Authenticator for NtlmSspi

source§

fn auth_scheme(&self) -> &'static str

HTTP auth schemes, as defined in RFC7235
source§

fn http_incoming_auth<'a, R>( &'a mut self, get_header: R ) -> Result<AuthState, Box<dyn Error>>
where R: Fn(&'static str) -> Result<Option<&'a str>, Box<dyn Error>>,

Performs authentication against a received request from the client. If authentication is incomplete, the caller is instructed through AuthState::Response to send the http response contained in AuthState::Response (401) to the client. After a full authentication attempt, do not call this method on the same Authenticator instance again.
source§

fn http_outgoing_auth<'a, F>( &'a mut self, get_header: F ) -> Result<AuthState, Box<dyn Error>>
where F: Fn(&'static str) -> Result<Vec<&'a str>, Box<dyn Error>>,

Provide an authentication state so the caller can retry an outgoing request until the server has all needed authentication information. If authentication is incomplete, the caller is instructed through AuthState::Response to retry the http request to the server with the headers contained in AuthState::Response. After a full authentication attempt, do not call this method on the same Authenticator instance again.
source§

impl NextBytes for NtlmSspi

source§

fn next_bytes( &mut self, in_bytes: Option<&[u8]> ) -> Result<Option<Vec<u8>>, Error>

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

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

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

source§

fn vzip(self) -> V