pub struct SqlConfig {
pub database_url: String,
pub password_query: String,
pub list_users_query: String,
pub create_user_query: String,
pub delete_user_query: String,
pub update_password_query: String,
pub scram_params_query: Option<String>,
pub scram_stored_key_query: Option<String>,
pub scram_server_key_query: Option<String>,
pub store_scram_query: Option<String>,
pub audit_table: Option<String>,
pub max_connections: u32,
}Expand description
Configuration for SQL authentication
Fields§
§database_url: StringDatabase connection URL
password_query: StringQuery to get password hash (must return columns: password_hash, enabled, quota_bytes, roles)
list_users_query: StringQuery to list all users (must return column: username)
create_user_query: StringQuery to create user
delete_user_query: StringQuery to delete user
update_password_query: StringQuery to update password
scram_params_query: Option<String>Query to get SCRAM parameters (salt, iterations)
scram_stored_key_query: Option<String>Query to get SCRAM StoredKey
scram_server_key_query: Option<String>Query to get SCRAM ServerKey
store_scram_query: Option<String>Query to store SCRAM credentials
audit_table: Option<String>Audit table name for logging auth attempts
max_connections: u32Maximum pool connections
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SqlConfig
impl RefUnwindSafe for SqlConfig
impl Send for SqlConfig
impl Sync for SqlConfig
impl Unpin for SqlConfig
impl UnsafeUnpin for SqlConfig
impl UnwindSafe for SqlConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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