Struct iron_hmac::Hmac256Authentication [] [src]

pub struct Hmac256Authentication {
    // some fields omitted
}

Iron middleware for validation hmac headers on requests and signing responses.

Methods

impl Hmac256Authentication

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 BeforeMiddleware for Hmac256Authentication

fn before(&self, req: &mut Request) -> IronResult<()>

fn catch(&self, &mut Request, err: IronError) -> Result<(), IronError>

impl AfterMiddleware for Hmac256Authentication

fn after(&self, _: &mut Request, res: Response) -> IronResult<Response>

fn catch(&self, &mut Request, err: IronError) -> Result<Response, IronError>

Derived Implementations

impl Clone for Hmac256Authentication

fn clone(&self) -> Hmac256Authentication

fn clone_from(&mut self, source: &Self)

impl Debug for Hmac256Authentication

fn fmt(&self, __arg_0: &mut Formatter) -> Result