mirror of
https://github.com/fafhrd91/actix-web
synced 2025-02-17 10:13:30 +01:00
update changes
This commit is contained in:
parent
3b3dbb4f40
commit
cba78e06ae
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
* Extend `Responder` trait, allow to override status code and headers.
|
* Extend `Responder` trait, allow to override status code and headers.
|
||||||
|
|
||||||
|
* Store visit and login timestamp in the identity cookie #502
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* `.to_async()` handler can return `Responder` type #792
|
* `.to_async()` handler can return `Responder` type #792
|
||||||
|
@ -512,12 +512,16 @@ impl CookieIdentityPolicy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Accepts only users whose cookie has been seen before the given deadline
|
/// Accepts only users whose cookie has been seen before the given deadline
|
||||||
|
///
|
||||||
|
/// By default visit deadline is disabled.
|
||||||
pub fn visit_deadline(mut self, value: Duration) -> CookieIdentityPolicy {
|
pub fn visit_deadline(mut self, value: Duration) -> CookieIdentityPolicy {
|
||||||
Rc::get_mut(&mut self.0).unwrap().visit_deadline = Some(value);
|
Rc::get_mut(&mut self.0).unwrap().visit_deadline = Some(value);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Accepts only users which has been authenticated before the given deadline
|
/// Accepts only users which has been authenticated before the given deadline
|
||||||
|
///
|
||||||
|
/// By default login deadline is disabled.
|
||||||
pub fn login_deadline(mut self, value: Duration) -> CookieIdentityPolicy {
|
pub fn login_deadline(mut self, value: Duration) -> CookieIdentityPolicy {
|
||||||
Rc::get_mut(&mut self.0).unwrap().login_deadline = Some(value);
|
Rc::get_mut(&mut self.0).unwrap().login_deadline = Some(value);
|
||||||
self
|
self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user