pub struct SessionClaims {
pub sub: PeerId,
pub cohort: CohortId,
pub exp: Timestamp,
pub exit_set: Vec<NodeId>,
pub path: Vec<NodeId>,
}Expand description
Claim set sealed inside a PASETO v4 session token.
Field names follow PASETO/JWT convention: sub for the subject
peer, exp for the expiry instant. Together with cohort,
exit_set, and path they fix every authorisation decision the
data plane makes on behalf of sub.
Fields§
§sub: PeerIdSubject peer the token was issued to.
cohort: CohortIdCohort this session belongs to.
exp: TimestampWall-clock instant after which the token must be rejected.
exit_set: Vec<NodeId>Exit nodes the subject is authorised to route through.
path: Vec<NodeId>Ordered forwarder chain the subject is authorised to use.
The last entry is the exit; preceding entries (if any) are the
forwarders, in the order traffic flows. A one-element path
(path == [exit]) is the direct single-hop case — the
pre-multihop shape collapses naturally into this form.
Trait Implementations§
Source§impl Clone for SessionClaims
impl Clone for SessionClaims
Source§fn clone(&self) -> SessionClaims
fn clone(&self) -> SessionClaims
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionClaims
impl Debug for SessionClaims
Source§impl<'de> Deserialize<'de> for SessionClaims
impl<'de> Deserialize<'de> for SessionClaims
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionClaims, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionClaims, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionClaims
impl PartialEq for SessionClaims
Source§fn eq(&self, other: &SessionClaims) -> bool
fn eq(&self, other: &SessionClaims) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionClaims
impl Serialize for SessionClaims
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 SessionClaims
impl StructuralPartialEq for SessionClaims
Auto Trait Implementations§
impl Freeze for SessionClaims
impl RefUnwindSafe for SessionClaims
impl Send for SessionClaims
impl Sync for SessionClaims
impl Unpin for SessionClaims
impl UnsafeUnpin for SessionClaims
impl UnwindSafe for SessionClaims
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