pub struct LairAgentSigner { /* private fields */ }Implementations§
Source§impl LairAgentSigner
impl LairAgentSigner
pub fn new(lair_client: Arc<LairClient>) -> Self
Sourcepub fn add_credentials(&mut self, cell_id: CellId, provenance: AgentPubKey)
pub fn add_credentials(&mut self, cell_id: CellId, provenance: AgentPubKey)
Add credentials for a cell to the signer.
The provenance should be the agent_pub_key that the cell is running as.
Trait Implementations§
Source§impl AgentSigner for LairAgentSigner
impl AgentSigner for LairAgentSigner
Source§fn get_cap_secret(&self, _cell_id: &CellId) -> Option<CapSecret>
fn get_cap_secret(&self, _cell_id: &CellId) -> Option<CapSecret>
Not used with Lair signing. If you have access to Lair then you don’t need to prove you
Source§fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
_cell_id: &'life1 CellId,
provenance: AgentPubKey,
data_to_sign: Arc<[u8]>,
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
_cell_id: &'life1 CellId,
provenance: AgentPubKey,
data_to_sign: Arc<[u8]>,
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sign the given data with the public key found in the agent id of the provenance.
fn get_provenance(&self, cell_id: &CellId) -> Option<AgentPubKey>
Auto Trait Implementations§
impl Freeze for LairAgentSigner
impl !RefUnwindSafe for LairAgentSigner
impl Send for LairAgentSigner
impl Sync for LairAgentSigner
impl Unpin for LairAgentSigner
impl !UnwindSafe for LairAgentSigner
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more