surrealpatch/lib/src/iam/clear.rs

13 lines
254 B
Rust
Raw Normal View History

use crate::dbs::Auth;
use crate::dbs::Session;
use crate::err::Error;
use std::sync::Arc;
pub fn clear(session: &mut Session) -> Result<(), Error> {
session.au = Arc::new(Auth::No);
session.tk = None;
session.sc = None;
session.sd = None;
Ok(())
}