pub struct AuthContext {Show 20 fields
pub app_name: String,
pub base_url: String,
pub base_path: String,
pub options: OpenAuthOptions,
pub auth_cookies: AuthCookies,
pub session_config: SessionConfig,
pub secret: String,
pub secret_config: SecretMaterial,
pub password: PasswordContext,
pub rate_limit: RateLimitContext,
pub trusted_origins: Vec<String>,
pub disabled_paths: Vec<String>,
pub plugins: Vec<AuthPlugin>,
pub adapter: Option<Arc<dyn DbAdapter>>,
pub social_providers: BTreeMap<String, Arc<dyn SocialOAuthProvider>>,
pub db_schema: DbSchema,
pub plugin_error_codes: BTreeMap<String, PluginErrorCode>,
pub plugin_database_hooks: Vec<PluginDatabaseHook>,
pub plugin_migrations: Vec<PluginMigration>,
pub logger: Logger,
}Fields§
§app_name: String§base_url: String§base_path: String§options: OpenAuthOptions§session_config: SessionConfig§secret: String§secret_config: SecretMaterial§password: PasswordContext§rate_limit: RateLimitContext§trusted_origins: Vec<String>§disabled_paths: Vec<String>§plugins: Vec<AuthPlugin>§adapter: Option<Arc<dyn DbAdapter>>§db_schema: DbSchema§plugin_error_codes: BTreeMap<String, PluginErrorCode>§plugin_database_hooks: Vec<PluginDatabaseHook>§plugin_migrations: Vec<PluginMigration>§logger: LoggerImplementations§
Source§impl AuthContext
impl AuthContext
pub fn adapter(&self) -> Option<Arc<dyn DbAdapter>>
pub fn has_plugin(&self, id: &str) -> bool
pub fn is_trusted_origin( &self, url: &str, settings: Option<OriginMatchSettings>, ) -> bool
pub fn trusted_origins_for_request( &self, request: Option<&Request<Vec<u8>>>, ) -> Result<Vec<String>, OpenAuthError>
pub fn is_trusted_origin_for_request( &self, url: &str, settings: Option<OriginMatchSettings>, request: Option<&Request<Vec<u8>>>, ) -> Result<bool, OpenAuthError>
Trait Implementations§
Source§impl Clone for AuthContext
impl Clone for AuthContext
Source§fn clone(&self) -> AuthContext
fn clone(&self) -> AuthContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthContext
impl !RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl UnsafeUnpin for AuthContext
impl !UnwindSafe for AuthContext
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