pub struct Fortify { /* private fields */ }Expand description
Laravel Fortify-style auth layer on top of Passport + Mail + Db.
Implementations§
Source§impl Fortify
impl Fortify
pub fn new() -> Self
pub fn features(self, features: impl IntoIterator<Item = Feature>) -> Self
Sourcepub fn web_forms(self, yes: bool) -> Self
pub fn web_forms(self, yes: bool) -> Self
Enable HTML GET form pages + POST routes under Self::mount (Laravel-style paths).
pub fn mount(self, path: impl Into<String>) -> Self
pub fn api_mount(self, path: impl Into<String>) -> Self
pub fn no_api(self) -> Self
pub fn paths(self, paths: FortifyPaths) -> Self
pub fn secret(self, secret: impl Into<String>) -> Self
pub fn public_url(self, url: impl Into<String>) -> Self
pub fn app_name(self, name: impl Into<String>) -> Self
pub fn home(self, path: impl Into<String>) -> Self
pub fn login_path(self, path: impl Into<String>) -> Self
Sourcepub fn login_redirect(self, path: impl Into<String>) -> Self
pub fn login_redirect(self, path: impl Into<String>) -> Self
Alias for Self::login_path (HTML guard redirect).
pub fn profile_path(self, path: impl Into<String>) -> Self
pub fn verify_path(self, path: impl Into<String>) -> Self
pub fn confirm_password_path(self, path: impl Into<String>) -> Self
pub fn two_factor_challenge_path(self, path: impl Into<String>) -> Self
pub fn allow_system_role_delete(self, yes: bool) -> Self
pub fn after_register<F, Fut>(self, f: F) -> Self
Sourcepub fn guard() -> MwEntry
pub fn guard() -> MwEntry
Require authenticated CurrentUser (redirect uses FortifyState.login_path).
pub fn guard_to(login: impl Into<String>) -> MwEntry
pub fn verified_to(path: impl Into<String>) -> MwEntry
Sourcepub fn password_confirmed() -> MwEntry
pub fn password_confirmed() -> MwEntry
Require recent password confirmation (path from state).
pub fn password_confirmed_to(path: impl Into<String>) -> MwEntry
pub fn permission(slug: impl Into<String>) -> MwEntry
pub fn role(slug: impl Into<String>) -> MwEntry
Trait Implementations§
Source§impl Plugin for Fortify
impl Plugin for Fortify
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn requires(&self) -> &'static [&'static str]
fn requires(&self) -> &'static [&'static str]
Required plugin ids that must be installed beforehand. Read more
Source§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl !RefUnwindSafe for Fortify
impl !UnwindSafe for Fortify
impl Freeze for Fortify
impl Send for Fortify
impl Sync for Fortify
impl Unpin for Fortify
impl UnsafeUnpin for Fortify
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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