pub struct QuickStartBuilder { /* private fields */ }
Expand description
Quick start builder for common authentication setups
Implementations§
Source§impl QuickStartBuilder
impl QuickStartBuilder
Sourcepub fn jwt_auth(self, secret: impl Into<String>) -> Self
pub fn jwt_auth(self, secret: impl Into<String>) -> Self
Configure JWT authentication with a secret key
Sourcepub fn jwt_auth_from_env(self) -> Self
pub fn jwt_auth_from_env(self) -> Self
Configure JWT authentication from JWT_SECRET environment variable
Sourcepub fn oauth2_auth(
self,
client_id: impl Into<String>,
client_secret: impl Into<String>,
) -> Self
pub fn oauth2_auth( self, client_id: impl Into<String>, client_secret: impl Into<String>, ) -> Self
Configure OAuth2 authentication
Sourcepub fn combined_auth(
self,
jwt_secret: impl Into<String>,
oauth_client_id: impl Into<String>,
oauth_client_secret: impl Into<String>,
) -> Self
pub fn combined_auth( self, jwt_secret: impl Into<String>, oauth_client_id: impl Into<String>, oauth_client_secret: impl Into<String>, ) -> Self
Configure both JWT and OAuth2 authentication
Sourcepub fn with_postgres(self, connection_string: impl Into<String>) -> Self
pub fn with_postgres(self, connection_string: impl Into<String>) -> Self
Use PostgreSQL storage with connection string
Sourcepub fn with_postgres_from_env(self) -> Self
pub fn with_postgres_from_env(self) -> Self
Use PostgreSQL storage from DATABASE_URL environment variable
Sourcepub fn with_redis(self, connection_string: impl Into<String>) -> Self
pub fn with_redis(self, connection_string: impl Into<String>) -> Self
Use Redis storage with connection string
Sourcepub fn with_redis_from_env(self) -> Self
pub fn with_redis_from_env(self) -> Self
Use Redis storage from REDIS_URL environment variable
Sourcepub fn with_memory_storage(self) -> Self
pub fn with_memory_storage(self) -> Self
Use in-memory storage (development only)
Sourcepub fn with_actix(self) -> Self
pub fn with_actix(self) -> Self
Configure for Actix Web framework
Sourcepub fn security_level(self, level: SecurityPreset) -> Self
pub fn security_level(self, level: SecurityPreset) -> Self
Set security level
Sourcepub async fn build(self) -> Result<AuthFramework, AuthError>
pub async fn build(self) -> Result<AuthFramework, AuthError>
Build the authentication framework
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuickStartBuilder
impl RefUnwindSafe for QuickStartBuilder
impl Send for QuickStartBuilder
impl Sync for QuickStartBuilder
impl Unpin for QuickStartBuilder
impl UnwindSafe for QuickStartBuilder
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