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