pub struct AgentIdentity {
pub agent: String,
pub key_id: String,
pub directory_url: String,
/* private fields */
}Expand description
An Ed25519 identity used for explicit HTTP Message Signature requests. The private key is retained only in this value and is never serialized.
Fields§
§agent: String§key_id: String§directory_url: StringImplementations§
Source§impl AgentIdentity
impl AgentIdentity
Sourcepub fn from_base64(
agent: impl Into<String>,
key_id: impl Into<String>,
directory_url: impl Into<String>,
private_key_base64: &str,
) -> BrowserResult<Self>
pub fn from_base64( agent: impl Into<String>, key_id: impl Into<String>, directory_url: impl Into<String>, private_key_base64: &str, ) -> BrowserResult<Self>
Load a 32-byte Ed25519 private key from standard base64.
Sourcepub fn sign_request(
&self,
method: &str,
target_uri: &str,
content_digest: Option<&str>,
created: i64,
) -> BrowserResult<SignedHttpRequest>
pub fn sign_request( &self, method: &str, target_uri: &str, content_digest: Option<&str>, created: i64, ) -> BrowserResult<SignedHttpRequest>
Sign the RFC 9421 covered components for one explicit request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentIdentity
impl RefUnwindSafe for AgentIdentity
impl Send for AgentIdentity
impl Sync for AgentIdentity
impl Unpin for AgentIdentity
impl UnsafeUnpin for AgentIdentity
impl UnwindSafe for AgentIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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