Skip to content

realaravinth/actix-auth-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actix Authentication Middleware

Documentation Build codecov

dependency status

Checks if session is authenticated


What

This library provides a generic middleware to protect authenticated routes from unauthenticated access. The middleware provides options to customise authentication checking mechanism, which enables it to support a wide range of session management mechanisms.

If a session is authenticated, then the request will be dispatched to the matching handler and if unauthenticated, it will be redirected to a user specified route, ideally a sign in route.

Usage

Add this to your Cargo.toml:

[dependencies.actix-auth-middleware]
version = "0.2.0"
git = "https://github.com/realaravinth/actix-auth-middleware"
# if using https://crates.io/crates/actix-identity, uncomment the
#following line:
#features = ["actix-identity"]

Example

  1. Cookie session management: source : cookie-identity.rs
    cargo run --example cookie-identity

About

Session management muddleware for actix web

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published