Skip to content

Commit

Permalink
Add identity service middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 19, 2018
1 parent f907be5 commit e9bdba5
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 0.5.4 (2018-04-xx)

* Add identity service middleware

* Middleware response() is not invoked if there was an error in async handler #187


Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "actix-web"
version = "0.5.3"
version = "0.5.4"
authors = ["Nikolay Kim <[email protected]>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md"
Expand Down
13 changes: 13 additions & 0 deletions src/httprequest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ impl<S> HttpRequest<S> {
&mut self.as_mut().extensions
}

/// Request extensions
#[inline]
#[doc(hidden)]
pub fn extensions_ro(&self) -> &Extensions {
&self.as_ref().extensions
}

/// Mutable refernece to a the request's extensions
#[inline]
pub fn extensions_mut(&mut self) -> &mut Extensions {
&mut self.as_mut().extensions
}

/// Default `CpuPool`
#[inline]
#[doc(hidden)]
Expand Down
4 changes: 2 additions & 2 deletions src/middleware/cors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//!
//! 1. Call [`Cors::build`](struct.Cors.html#method.build) to start building.
//! 2. Use any of the builder methods to set fields in the backend.
//! 3. Call [finish](struct.Cors.html#method.finish) to retrieve the
//! constructed backend.
//! 3. Call [finish](struct.Cors.html#method.finish) to retrieve the
//! constructed backend.
//!
//! Cors middleware could be used as parameter for `App::middleware()` or
//! `ResourceHandler::middleware()` methods. But you have to use
Expand Down
Loading

0 comments on commit e9bdba5

Please sign in to comment.