pub struct CapabilityTokenBody {
pub id: String,
pub issuer: PublicKey,
pub subject: PublicKey,
pub scope: ChioScope,
pub issued_at: u64,
pub expires_at: u64,
pub delegation_chain: Vec<DelegationLink>,
}Expand description
The body of a capability token, containing every field except the signature. Used as the signing input.
The declared signing algorithm is not included in the body: the signature
type itself is self-describing (Ed25519 / P-256 / P-384) via its hex
encoding, and the issuer key encodes its own algorithm. This keeps the
pre-SigningBackend Ed25519 body serialization byte-identical.
Fields§
§id: String§issuer: PublicKey§subject: PublicKey§scope: ChioScope§issued_at: u64§expires_at: u64§delegation_chain: Vec<DelegationLink>Trait Implementations§
Source§impl Clone for CapabilityTokenBody
impl Clone for CapabilityTokenBody
Source§fn clone(&self) -> CapabilityTokenBody
fn clone(&self) -> CapabilityTokenBody
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 CapabilityTokenBody
impl Debug for CapabilityTokenBody
Source§impl<'de> Deserialize<'de> for CapabilityTokenBody
impl<'de> Deserialize<'de> for CapabilityTokenBody
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapabilityTokenBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapabilityTokenBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CapabilityTokenBody
impl Serialize for CapabilityTokenBody
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
Auto Trait Implementations§
impl Freeze for CapabilityTokenBody
impl RefUnwindSafe for CapabilityTokenBody
impl Send for CapabilityTokenBody
impl Sync for CapabilityTokenBody
impl Unpin for CapabilityTokenBody
impl UnsafeUnpin for CapabilityTokenBody
impl UnwindSafe for CapabilityTokenBody
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