pub struct SessionAnchor {
pub schema: String,
pub id: String,
pub session_id: SessionId,
pub agent_id: String,
pub auth_context: SessionAuthContext,
pub auth_context_hash: String,
pub auth_method_hash: String,
pub proof_binding: Option<SessionProofBinding>,
pub auth_epoch: u64,
pub issued_at: u64,
pub kernel_key: PublicKey,
pub signature: Signature,
}Expand description
Signed session anchor that captures authenticated session continuity.
Fields§
§schema: String§id: String§session_id: SessionId§agent_id: String§auth_context: SessionAuthContext§auth_context_hash: String§auth_method_hash: String§proof_binding: Option<SessionProofBinding>§auth_epoch: u64§issued_at: u64§kernel_key: PublicKey§signature: SignatureImplementations§
Source§impl SessionAnchor
impl SessionAnchor
pub fn sign( body: SessionAnchorBody, keypair: &Keypair, ) -> Result<SessionAnchor, Error>
pub fn body(&self) -> SessionAnchorBody
pub fn verify_signature(&self) -> Result<bool, Error>
pub fn anchor_hash(&self) -> Result<String, Error>
pub fn reference(&self) -> Result<SessionAnchorReference, Error>
pub fn matches_context( &self, auth_context: &SessionAuthContext, proof_binding: Option<&SessionProofBinding>, ) -> Result<bool, Error>
Trait Implementations§
Source§impl Clone for SessionAnchor
impl Clone for SessionAnchor
Source§fn clone(&self) -> SessionAnchor
fn clone(&self) -> SessionAnchor
Returns a duplicate 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 moreSource§impl Debug for SessionAnchor
impl Debug for SessionAnchor
Source§impl<'de> Deserialize<'de> for SessionAnchor
impl<'de> Deserialize<'de> for SessionAnchor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionAnchor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionAnchor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionAnchor
impl PartialEq for SessionAnchor
Source§impl Serialize for SessionAnchor
impl Serialize for SessionAnchor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for SessionAnchor
impl StructuralPartialEq for SessionAnchor
Auto Trait Implementations§
impl Freeze for SessionAnchor
impl RefUnwindSafe for SessionAnchor
impl Send for SessionAnchor
impl Sync for SessionAnchor
impl Unpin for SessionAnchor
impl UnsafeUnpin for SessionAnchor
impl UnwindSafe for SessionAnchor
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