actix-auth

Crates.ioactix-auth
lib.rsactix-auth
version0.1.0
sourcesrc
created_at2020-01-09 06:32:03.644807
updated_at2020-01-09 06:32:03.644807
descriptionactix auth is a cookie auth macro
homepage
repositoryhttps://github.com/Lomect/actix-auth.git
max_upload_size
id196846
size6,532
lome (Lomect)

documentation

README

actix-auth

actix auth macro

dependencies

actix-web
actix-identity

example

actix auth must have a params: _id: Identity actix auth have a string by let Some(ident) = identity.identity();.

use actix_auth::login_required;

#[login_required]
pub async fn index(_id: Identity) -> HttpResponse {
    HttpResponse::Ok().json(ident)
}
Commit count: 4

cargo fmt