pub struct AuthState {
pub webauthn: Arc<Webauthn>,
pub reg_states: Arc<RwLock<HashMap<String, (PasskeyRegistration, String)>>>,
pub auth_states: Arc<RwLock<HashMap<String, (PasskeyAuthentication, i32)>>>,
pub credentials: Arc<RwLock<HashMap<i32, Vec<Passkey>>>>,
pub users: Arc<RwLock<HashMap<String, i32>>>,
pub sessions: Arc<RwLock<HashMap<String, i32>>>,
pub ai_provider: Option<Arc<dyn AiProvider>>,
pub db: Option<Arc<ParadeDbRepository>>,
pub push: PushService,
}Fields§
§webauthn: Arc<Webauthn>§reg_states: Arc<RwLock<HashMap<String, (PasskeyRegistration, String)>>>§auth_states: Arc<RwLock<HashMap<String, (PasskeyAuthentication, i32)>>>§credentials: Arc<RwLock<HashMap<i32, Vec<Passkey>>>>§users: Arc<RwLock<HashMap<String, i32>>>§sessions: Arc<RwLock<HashMap<String, i32>>>§ai_provider: Option<Arc<dyn AiProvider>>§db: Option<Arc<ParadeDbRepository>>§push: PushServiceImplementations§
Source§impl AuthState
impl AuthState
pub fn new( ai_provider: Option<Arc<dyn AiProvider>>, db: Option<Arc<ParadeDbRepository>>, push: PushService, ) -> Self
pub fn next_user_id() -> i32
pub fn generate_token() -> String
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AuthState
impl !UnwindSafe for AuthState
impl Freeze for AuthState
impl Send for AuthState
impl Sync for AuthState
impl Unpin for AuthState
impl UnsafeUnpin for AuthState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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