Struct winauth::NtlmV2ClientBuilder
source · pub struct NtlmV2ClientBuilder<'a> { /* private fields */ }
Expand description
Builder for NtlmV2Client
which provides configuration for it
Implementations§
source§impl<'a> NtlmV2ClientBuilder<'a>
impl<'a> NtlmV2ClientBuilder<'a>
pub fn new() -> NtlmV2ClientBuilder<'a>
sourcepub fn target_spn<S: Into<Cow<'a, str>>>(
self,
spn: S
) -> NtlmV2ClientBuilder<'a>
pub fn target_spn<S: Into<Cow<'a, str>>>( self, spn: S ) -> NtlmV2ClientBuilder<'a>
Set a target SPN. This requires a client to specify that it intends to identify against this SPN.
This limits replay attacks against the same server/service, since the SPN has to match.
sourcepub fn channel_bindings(self, binding: &[u8]) -> NtlmV2ClientBuilder<'a>
pub fn channel_bindings(self, binding: &[u8]) -> NtlmV2ClientBuilder<'a>
Set a channel binding. This limits client requests to the same channel.
This means e.g. that the authentication can only be successful over the same TLS connection.
sourcepub fn build<D, U, P>(
self,
domain: Option<D>,
user: U,
password: P
) -> NtlmV2Client<'a>
pub fn build<D, U, P>( self, domain: Option<D>, user: U, password: P ) -> NtlmV2Client<'a>
Build the resulting NTLMv2Client
.
§Warning
This may be vulnerable to replay-attacks since it doesn’t bind to any SPN
(would be accepted by ANY server) and to any channel
(can be relayed in general and isn’t limited to the current connection)
So make sure to use target_spn
/channel_bindings
Auto Trait Implementations§
impl<'a> Freeze for NtlmV2ClientBuilder<'a>
impl<'a> RefUnwindSafe for NtlmV2ClientBuilder<'a>
impl<'a> Send for NtlmV2ClientBuilder<'a>
impl<'a> Sync for NtlmV2ClientBuilder<'a>
impl<'a> Unpin for NtlmV2ClientBuilder<'a>
impl<'a> UnwindSafe for NtlmV2ClientBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more