Struct rings_core::session::SessionManager
source · pub struct SessionManager { /* private fields */ }Expand description
SessionManager holds the Session and its delegated private key. To prove that the message was sent by the Authorizer of Session, we need to attach session and the signature signed by session_key to the payload.
SessionManager provide a session method to clone the session.
SessionManager also provide sign method to sign a message.
To verify the session, use verify_self() method of Session.
To verify a message, use verify(msg, sig) method of Session.
Implementations§
source§impl SessionManager
impl SessionManager
sourcepub fn new_with_seckey(key: &SecretKey) -> Result<Self>
pub fn new_with_seckey(key: &SecretKey) -> Result<Self>
Generate Session with private key. Only use it for unittest.
Get authorizer did from session.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnwindSafe for SessionManager
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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