pub struct EdgeRCSigner { /* private fields */ }
Expand description
EdgeRCSigner
holds the section credentials and methods to perform a signature
Implementations§
Source§impl EdgeRCSigner
impl EdgeRCSigner
Sourcepub fn canonicalize_headers(headers: Vec<(String, String)>) -> String
pub fn canonicalize_headers(headers: Vec<(String, String)>) -> String
Generates the canonicalize headers to use in a (request)EdgeRCRequest
Taking into account:
- The order of the headers
- If are marked to be signed
Sourcepub fn encode_body(data: String, max_length: Option<usize>) -> String
pub fn encode_body(data: String, max_length: Option<usize>) -> String
Handle the body codification and is mandatory to pass an the body argument either is present or not.
max_length
Option<usize>
is an optional parameter for the encryption body length in bytes
- By default uses the limit provided by akamai
- If max length is set up in .edgerc file will be used as default //TODO
Returns the (Authorization header)String value to place in the actual HTTP request
Sourcepub fn get_url(&self, request: EdgeRCRequest) -> String
pub fn get_url(&self, request: EdgeRCRequest) -> String
Returns full formatted (URL)String -> https://hostname/resource/?query=params
Sourcepub fn get_hostname(&self) -> String
pub fn get_hostname(&self) -> String
Returns the hostname from edgeRC file String -> hostname
Sourcepub fn get_path(&self, request: &EdgeRCRequest) -> String
pub fn get_path(&self, request: &EdgeRCRequest) -> String
Returns full formatted (Path)String -> /resource/?query=params
Trait Implementations§
Source§impl Clone for EdgeRCSigner
impl Clone for EdgeRCSigner
Source§fn clone(&self) -> EdgeRCSigner
fn clone(&self) -> EdgeRCSigner
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EdgeRCSigner
impl Debug for EdgeRCSigner
Source§impl PartialEq for EdgeRCSigner
impl PartialEq for EdgeRCSigner
impl StructuralPartialEq for EdgeRCSigner
Auto Trait Implementations§
impl Freeze for EdgeRCSigner
impl RefUnwindSafe for EdgeRCSigner
impl Send for EdgeRCSigner
impl Sync for EdgeRCSigner
impl Unpin for EdgeRCSigner
impl UnwindSafe for EdgeRCSigner
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