pub struct SigningManager { /* private fields */ }Expand description
Signing key manager
Implementations§
Source§impl SigningManager
impl SigningManager
Sourcepub fn new(config: SigningConfig) -> Result<Self>
pub fn new(config: SigningConfig) -> Result<Self>
Create a new signing manager
Sourcepub fn sign_message(&self, message: &Value) -> Result<SignedMessage>
pub fn sign_message(&self, message: &Value) -> Result<SignedMessage>
Sign a message
Sourcepub fn verify_message(&self, signed: &SignedMessage) -> Result<()>
pub fn verify_message(&self, signed: &SignedMessage) -> Result<()>
Verify a signed message
Sourcepub fn extract_signature(authorization: &str) -> Option<MessageSignature>
pub fn extract_signature(authorization: &str) -> Option<MessageSignature>
Extract signature from authorization header
Sourcepub fn create_auth_header(signature: &MessageSignature) -> String
pub fn create_auth_header(signature: &MessageSignature) -> String
Create authorization header from signature
Auto Trait Implementations§
impl Freeze for SigningManager
impl RefUnwindSafe for SigningManager
impl Send for SigningManager
impl Sync for SigningManager
impl Unpin for SigningManager
impl UnsafeUnpin for SigningManager
impl UnwindSafe for SigningManager
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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