pub struct SecurityBuilder { /* private fields */ }Expand description
Sub-builder for security settings (passwords, cookies, CSRF).
Entered via AuthBuilder::with_security(); call
done() to return to the parent builder.
Implementations§
Source§impl SecurityBuilder
impl SecurityBuilder
Sourcepub fn min_password_length(self, length: usize) -> Self
pub fn min_password_length(self, length: usize) -> Self
Set minimum password length.
§Example
use auth_framework::prelude::*;
let builder = AuthFramework::builder()
.with_security().min_password_length(12).done();Sourcepub fn require_password_complexity(self, required: bool) -> Self
pub fn require_password_complexity(self, required: bool) -> Self
Enable/disable password complexity requirements.
§Example
use auth_framework::prelude::*;
let builder = AuthFramework::builder()
.with_security().require_password_complexity(false).done();Enable/disable secure cookies.
§Example
use auth_framework::prelude::*;
let builder = AuthFramework::builder()
.with_security().secure_cookies(true).done();Sourcepub fn done(self) -> AuthBuilder
pub fn done(self) -> AuthBuilder
Complete security configuration and return to main builder.
Auto Trait Implementations§
impl Freeze for SecurityBuilder
impl !RefUnwindSafe for SecurityBuilder
impl Send for SecurityBuilder
impl Sync for SecurityBuilder
impl Unpin for SecurityBuilder
impl UnsafeUnpin for SecurityBuilder
impl !UnwindSafe for SecurityBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more