pub struct Session { /* private fields */ }
Expand description
OpenID connect login session
Implementations§
Source§impl Session
impl Session
Sourcepub fn new_session() -> Result<Session, Error>
pub fn new_session() -> Result<Session, Error>
Start new OpenID connect session
Sourcepub fn save_session(&self) -> (String, String)
pub fn save_session(&self) -> (String, String)
Serialize session and returns (key, value) pair.
Implementer should store key
in browser session cookie or local storage,
and store (key,value)
pair in server side database.
Both key
and value
is URL safe string
Sourcepub fn load_session(
session_key: &str,
session_value: &str,
) -> Result<Self, DecodeSliceError>
pub fn load_session( session_key: &str, session_value: &str, ) -> Result<Self, DecodeSliceError>
Deserialize session saved by save_session()
Implementer should get session key from cookie,
and load session_value from server side database.
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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