Struct rings_node::prelude::SessionManager
source · pub struct SessionManager { /* private fields */ }Expand description
Manager about Session.
Implementations§
source§impl SessionManager
impl SessionManager
sourcepub fn gen_unsign_info_with_ed25519_pubkey(
ttl: Option<Ttl>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey), Error>
pub fn gen_unsign_info_with_ed25519_pubkey(
ttl: Option<Ttl>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey), Error>
Generate unsign info with a given ed25519 pubkey.
sourcepub fn gen_unsign_info_with_pubkey(
ttl: Option<Ttl>,
signer: Option<Signer>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey), Error>
pub fn gen_unsign_info_with_pubkey(
ttl: Option<Ttl>,
signer: Option<Signer>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey), Error>
Generate unsigned info with public key.
sourcepub fn gen_unsign_info(
did: Did,
ttl: Option<Ttl>,
signer: Option<Signer>
) -> (AuthorizedInfo, SecretKey)
pub fn gen_unsign_info(
did: Did,
ttl: Option<Ttl>,
signer: Option<Signer>
) -> (AuthorizedInfo, SecretKey)
Generate unsigned info with.
sourcepub fn new(
sig: &[u8],
auth_info: &AuthorizedInfo,
session_key: &SecretKey
) -> SessionManager
pub fn new(
sig: &[u8],
auth_info: &AuthorizedInfo,
session_key: &SecretKey
) -> SessionManager
sig: Signature of AuthorizedInfo.
auth_info: generated from gen_unsign_info.
session_key: temp key from gen_unsign_info.
sourcepub fn new_with_seckey(
key: &SecretKey,
ttl: Option<Ttl>
) -> Result<SessionManager, Error>
pub fn new_with_seckey(
key: &SecretKey,
ttl: Option<Ttl>
) -> Result<SessionManager, Error>
Generate Session with private key. Only use it for unittest.
sourcepub fn renew(
&self,
sig: &[u8],
auth_info: &AuthorizedInfo,
key: &SecretKey
) -> Result<&SessionManager, Error>
pub fn renew(
&self,
sig: &[u8],
auth_info: &AuthorizedInfo,
key: &SecretKey
) -> Result<&SessionManager, Error>
Renew session with new sig.
sourcepub fn session_key(&self) -> Result<SecretKey, Error>
pub fn session_key(&self) -> Result<SecretKey, Error>
Get secret key from SessionManager.
Get authorizer from session.
Trait Implementations§
source§impl Clone for SessionManager
impl Clone for SessionManager
source§fn clone(&self) -> SessionManager
fn clone(&self) -> SessionManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more