pub struct SsoSessionStore { /* private fields */ }Expand description
Session store with CAS retry on client upsert. 带 CAS 重试的会话存储(客户端 upsert)。
Implementations§
Source§impl SsoSessionStore
impl SsoSessionStore
Sourcepub fn new(dao: Arc<SaTokenDao>) -> Self
pub fn new(dao: Arc<SaTokenDao>) -> Self
Create a session store. 创建会话存储。
Sourcepub async fn upsert_client(
&self,
login_id: &str,
service: &str,
) -> SaTokenResult<()>
pub async fn upsert_client( &self, login_id: &str, service: &str, ) -> SaTokenResult<()>
Add a client URL to the session with CAS retries (max 8). 以 CAS 重试(最多 8 次)将会话加入客户端 URL。
Sourcepub async fn remove(&self, login_id: &str) -> SaTokenResult<Vec<String>>
pub async fn remove(&self, login_id: &str) -> SaTokenResult<Vec<String>>
Remove session and return tracked client URLs. 删除会话并返回已跟踪的客户端 URL。
Sourcepub async fn get(&self, login_id: &str) -> SaTokenResult<Option<SsoSession>>
pub async fn get(&self, login_id: &str) -> SaTokenResult<Option<SsoSession>>
Load session if present. 若存在则加载会话。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SsoSessionStore
impl !UnwindSafe for SsoSessionStore
impl Freeze for SsoSessionStore
impl Send for SsoSessionStore
impl Sync for SsoSessionStore
impl Unpin for SsoSessionStore
impl UnsafeUnpin for SsoSessionStore
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