[−][src]Struct iron_hmac::Hmac256Authentication
Iron middleware for validation hmac headers on requests and signing responses.
Methods
impl Hmac256Authentication
[src]
impl Hmac256Authentication
pub fn middleware<K: Into<SecretKey>, S: Into<String>>(
secret: K,
hmac_header_key: S
) -> (Hmac256Authentication, Hmac256Authentication)
[src]
pub fn middleware<K: Into<SecretKey>, S: Into<String>>(
secret: K,
hmac_header_key: S
) -> (Hmac256Authentication, Hmac256Authentication)
Build Hmac256Authentication BeforeMiddleware and AfterMiddleware
The secret
parameter is used for all HMAC generation. The hmac_header_key
is used to
lookup the request's HMAC.
Trait Implementations
impl Clone for Hmac256Authentication
[src]
impl Clone for Hmac256Authentication
fn clone(&self) -> Hmac256Authentication
[src]
fn clone(&self) -> Hmac256Authentication
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Hmac256Authentication
[src]
impl Debug for Hmac256Authentication
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl BeforeMiddleware for Hmac256Authentication
[src]
impl BeforeMiddleware for Hmac256Authentication
fn before(&self, req: &mut Request) -> IronResult<()>
[src]
fn before(&self, req: &mut Request) -> IronResult<()>
Do whatever work this middleware should do with a Request
object.
fn catch(&self, &mut Request, err: IronError) -> Result<(), IronError>
[src]
fn catch(&self, &mut Request, err: IronError) -> Result<(), IronError>
Respond to an error thrown by a previous BeforeMiddleware
. Read more
impl AfterMiddleware for Hmac256Authentication
[src]
impl AfterMiddleware for Hmac256Authentication
fn after(&self, _: &mut Request, res: Response) -> IronResult<Response>
[src]
fn after(&self, _: &mut Request, res: Response) -> IronResult<Response>
Do whatever post-processing this middleware should do.
fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>
[src]
fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>
Respond to an error thrown by previous AfterMiddleware
, the Handler
, or a BeforeMiddleware
. Read more
Auto Trait Implementations
impl Send for Hmac256Authentication
impl Send for Hmac256Authentication
impl Sync for Hmac256Authentication
impl Sync for Hmac256Authentication
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<F> BeforeMiddleware for F where
F: Send + Sync + 'static + Fn(&mut Request) -> Result<(), IronError>,
[src]
impl<F> BeforeMiddleware for F where
F: Send + Sync + 'static + Fn(&mut Request) -> Result<(), IronError>,
fn before(&self, req: &mut Request) -> Result<(), IronError>
[src]
fn before(&self, req: &mut Request) -> Result<(), IronError>
Do whatever work this middleware should do with a Request
object.
fn catch(&self, &mut Request, err: IronError) -> Result<(), IronError>
[src]
fn catch(&self, &mut Request, err: IronError) -> Result<(), IronError>
Respond to an error thrown by a previous BeforeMiddleware
. Read more
impl<F> AfterMiddleware for F where
F: Send + Sync + 'static + Fn(&mut Request, Response) -> Result<Response, IronError>,
[src]
impl<F> AfterMiddleware for F where
F: Send + Sync + 'static + Fn(&mut Request, Response) -> Result<Response, IronError>,
fn after(&self, req: &mut Request, res: Response) -> Result<Response, IronError>
[src]
fn after(&self, req: &mut Request, res: Response) -> Result<Response, IronError>
Do whatever post-processing this middleware should do.
fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>
[src]
fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>
Respond to an error thrown by previous AfterMiddleware
, the Handler
, or a BeforeMiddleware
. Read more
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
impl<T> DebugAny for T where
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
impl<T> CloneAny for T where
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,
impl<T> PersistentInto for T
[src]
impl<T> PersistentInto for T
fn persistent_into(self) -> Arc<T>
[src]
fn persistent_into(self) -> Arc<T>
Convert self
into a value of type T
.
impl<T> PersistentInto for T
[src]
impl<T> PersistentInto for T
fn persistent_into(self) -> Arc<Mutex<T>>
[src]
fn persistent_into(self) -> Arc<Mutex<T>>
Convert self
into a value of type T
.
impl<T> PersistentInto for T
[src]
impl<T> PersistentInto for T
fn persistent_into(self) -> T
[src]
fn persistent_into(self) -> T
Convert self
into a value of type T
.
impl<T> PersistentInto for T
[src]
impl<T> PersistentInto for T
fn persistent_into(self) -> Arc<RwLock<T>>
[src]
fn persistent_into(self) -> Arc<RwLock<T>>
Convert self
into a value of type T
.