Trait actix_web::middleware::identity::Identity
source · pub trait Identity: 'static {
fn identity(&self) -> Option<&str>;
fn remember(&mut self, key: String);
fn forget(&mut self);
fn write(&mut self, resp: HttpResponse) -> Result<Response>;
}
Expand description
An identity
Required Methods
sourcefn identity(&self) -> Option<&str>
fn identity(&self) -> Option<&str>
Return the claimed identity of the user associated request or
None
if no identity can be found associated with the request.
sourcefn forget(&mut self)
fn forget(&mut self)
This method is used to ‘forget’ the current identity on subsequent requests.
sourcefn write(&mut self, resp: HttpResponse) -> Result<Response>
fn write(&mut self, resp: HttpResponse) -> Result<Response>
Write session to storage backend.