pub struct StandardCupv2Handler { /* private fields */ }
Implementations§
Source§impl StandardCupv2Handler
impl StandardCupv2Handler
Sourcepub fn new(public_keys: &PublicKeys) -> Self
pub fn new(public_keys: &PublicKeys) -> Self
Constructor for the standard CUPv2 handler.
Trait Implementations§
Source§impl Cupv2RequestHandler for StandardCupv2Handler
impl Cupv2RequestHandler for StandardCupv2Handler
Source§fn decorate_request(
&self,
request: &mut impl CupRequest,
) -> Result<RequestMetadata, CupDecorationError>
fn decorate_request( &self, request: &mut impl CupRequest, ) -> Result<RequestMetadata, CupDecorationError>
Decorate an outgoing client request with query parameters
cup2key
.
Returns a struct of request metadata, the hash of which can be stored and
used later.Source§fn verify_response(
&self,
request_metadata: &RequestMetadata,
resp: &Response<Vec<u8>>,
public_key_id: PublicKeyId,
) -> Result<DerSignature, CupVerificationError>
fn verify_response( &self, request_metadata: &RequestMetadata, resp: &Response<Vec<u8>>, public_key_id: PublicKeyId, ) -> Result<DerSignature, CupVerificationError>
Examines an incoming client request with an ETag HTTP Header. Returns an
error if the response is not authentic.
Source§impl Cupv2Verifier for StandardCupv2Handler
impl Cupv2Verifier for StandardCupv2Handler
Source§fn verify_response_with_signature(
&self,
ecdsa_signature: &DerSignature,
request_body: &[u8],
response_body: &[u8],
public_key_id: PublicKeyId,
nonce: &Nonce,
) -> Result<(), CupVerificationError>
fn verify_response_with_signature( &self, ecdsa_signature: &DerSignature, request_body: &[u8], response_body: &[u8], public_key_id: PublicKeyId, nonce: &Nonce, ) -> Result<(), CupVerificationError>
The same behavior as verify_response, but designed for verifying stored
signatures which are not hyper-aware.
Auto Trait Implementations§
impl Freeze for StandardCupv2Handler
impl RefUnwindSafe for StandardCupv2Handler
impl Send for StandardCupv2Handler
impl Sync for StandardCupv2Handler
impl Unpin for StandardCupv2Handler
impl UnwindSafe for StandardCupv2Handler
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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