Struct ic_agent::identity::DelegatedIdentity
source · pub struct DelegatedIdentity { /* private fields */ }Expand description
An identity that has been delegated the authority to authenticate as a different principal.
Implementations§
source§impl DelegatedIdentity
impl DelegatedIdentity
sourcepub fn new(
from_key: Vec<u8>,
to: Box<dyn Identity>,
chain: Vec<SignedDelegation>
) -> Self
pub fn new( from_key: Vec<u8>, to: Box<dyn Identity>, chain: Vec<SignedDelegation> ) -> Self
Creates a delegated identity that signs using to, for the principal corresponding to the public key from_key.
chain must be a list of delegations connecting from_key to to.public_key(), and in that order.
Trait Implementations§
source§impl Identity for DelegatedIdentity
impl Identity for DelegatedIdentity
source§fn sender(&self) -> Result<Principal, String>
fn sender(&self) -> Result<Principal, String>
Returns a sender, ie. the Principal ID that is used to sign a request. Read more
source§fn sign(&self, content: &EnvelopeContent) -> Result<Signature, String>
fn sign(&self, content: &EnvelopeContent) -> Result<Signature, String>
Sign a request ID derived from a content map. Read more
source§fn sign_delegation(&self, content: &Delegation) -> Result<Signature, String>
fn sign_delegation(&self, content: &Delegation) -> Result<Signature, String>
source§fn sign_arbitrary(&self, content: &[u8]) -> Result<Signature, String>
fn sign_arbitrary(&self, content: &[u8]) -> Result<Signature, String>
Sign arbitrary bytes. Read more
source§fn delegation_chain(&self) -> Vec<SignedDelegation>
fn delegation_chain(&self) -> Vec<SignedDelegation>
A list of signed delegations connecting
sender
to public_key, and in that order.Auto Trait Implementations§
impl !RefUnwindSafe for DelegatedIdentity
impl Send for DelegatedIdentity
impl Sync for DelegatedIdentity
impl Unpin for DelegatedIdentity
impl !UnwindSafe for DelegatedIdentity
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