pub struct Sessions { /* private fields */ }Expand description
Every credential of the dashboard: the session secret, kept in a file only the daemon’s user can read, which every signed-in browser holds in its cookie; the login links of a running dashboard; and the pairing codes.
Implementations§
Source§impl Sessions
impl Sessions
Sourcepub fn open(file: PathBuf) -> Result<Arc<Sessions>>
pub fn open(file: PathBuf) -> Result<Arc<Sessions>>
The secret in file, or a new one written there when it is missing, malformed, or readable by other users.
Fails when other users can write to its directory, or file is a symbolic link or not a regular file.
Sourcepub fn sign_out_all(&self) -> Result<()>
pub fn sign_out_all(&self) -> Result<()>
Replaces the secret, so every browser signed in is signed out, and every login link and pairing code made before, so none signs one in again; the login file gets new links.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Sessions
impl RefUnwindSafe for Sessions
impl Send for Sessions
impl Sync for Sessions
impl Unpin for Sessions
impl UnsafeUnpin for Sessions
impl UnwindSafe for Sessions
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