pub struct AnonymousService<S> { /* private fields */ }Expand description
Anonymous / guest authentication service.
Guest accounts are real User rows with a synthetic email and
metadata: {"guest": true}. They can be upgraded later.
Implementations§
Source§impl<S> AnonymousService<S>
impl<S> AnonymousService<S>
pub fn new(storage: S, events: EventBus, session_ttl_secs: i64) -> Self
Sourcepub async fn create_guest(&self, ip: &str) -> Result<GuestSession>
pub async fn create_guest(&self, ip: &str) -> Result<GuestSession>
Create an anonymous guest session. The returned User row has a synthetic
guest_<uuid>@authx.guest email and metadata: {"guest": true}.
Auto Trait Implementations§
impl<S> Freeze for AnonymousService<S>where
S: Freeze,
impl<S> !RefUnwindSafe for AnonymousService<S>
impl<S> Send for AnonymousService<S>where
S: Send,
impl<S> Sync for AnonymousService<S>where
S: Sync,
impl<S> Unpin for AnonymousService<S>where
S: Unpin,
impl<S> UnsafeUnpin for AnonymousService<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for AnonymousService<S>
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