pub struct Engine<S = Missing, T = Missing> {
pub providers: HashMap<String, Arc<dyn ErasedOAuthFlow>>,
pub session_store: S,
pub session_config: SessionConfig,
pub token_manager: T,
}Expand description
The central orchestrator for Authkestra.
Engine ties together authentication methods, session management, and flows.
It is constructed using the EngineBuilder which uses the Typestate pattern
to ensure that certain methods are only available when the necessary components are configured.
Fields§
§providers: HashMap<String, Arc<dyn ErasedOAuthFlow>>Map of registered OAuth providers.
session_store: SThe session storage backend.
session_config: SessionConfigConfiguration for session cookies.
token_manager: TManager for JWT signing and verification.
Implementations§
Source§impl Engine<Missing, Missing>
impl Engine<Missing, Missing>
Sourcepub fn builder() -> EngineBuilder<Missing, Missing>
pub fn builder() -> EngineBuilder<Missing, Missing>
Start building a new Engine.
Source§impl<T> Engine<Configured<Arc<dyn SessionStore>>, T>
impl<T> Engine<Configured<Arc<dyn SessionStore>>, T>
Sourcepub fn session_store(&self) -> Arc<dyn SessionStore>
pub fn session_store(&self) -> Arc<dyn SessionStore>
Get the session store.
Source§impl<S> Engine<S, Configured<Arc<TokenManager>>>
impl<S> Engine<S, Configured<Arc<TokenManager>>>
Sourcepub fn token_manager(&self) -> Arc<TokenManager>
pub fn token_manager(&self) -> Arc<TokenManager>
Get the token manager.
Trait Implementations§
Source§impl<T> HasSessionStore for Engine<Configured<Arc<dyn SessionStore>>, T>
impl<T> HasSessionStore for Engine<Configured<Arc<dyn SessionStore>>, T>
Source§fn session_store(&self) -> Arc<dyn SessionStore>
fn session_store(&self) -> Arc<dyn SessionStore>
Returns the session store.
Source§impl<S> HasTokenManager for Engine<S, Configured<Arc<TokenManager>>>
Available on crate feature token only.
impl<S> HasTokenManager for Engine<S, Configured<Arc<TokenManager>>>
Available on crate feature
token only.Source§fn token_manager(&self) -> Arc<TokenManager>
fn token_manager(&self) -> Arc<TokenManager>
Returns the token manager.
Auto Trait Implementations§
impl<S = Missing, T = Missing> !RefUnwindSafe for Engine<S, T>
impl<S = Missing, T = Missing> !UnwindSafe for Engine<S, T>
impl<S, T> Freeze for Engine<S, T>
impl<S, T> Send for Engine<S, T>
impl<S, T> Sync for Engine<S, T>
impl<S, T> Unpin for Engine<S, T>
impl<S, T> UnsafeUnpin for Engine<S, T>where
S: UnsafeUnpin,
T: UnsafeUnpin,
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