pub enum AuthMode {
Bearer,
Jwt {
ttl_seconds: i64,
},
}Expand description
Authentication mode for the realtime WebSocket handshake.
Variants§
Bearer
Server-side Bearer auth: Authorization: Bearer {API_KEY} (default).
Jwt
Client-side JWT auth: a short-lived token signed from the API key’s secret, so the secret never leaves the server. Used when the WebSocket is opened directly from a browser/device.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthMode
impl RefUnwindSafe for AuthMode
impl Send for AuthMode
impl Sync for AuthMode
impl Unpin for AuthMode
impl UnsafeUnpin for AuthMode
impl UnwindSafe for AuthMode
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