casbin-rs / actix-casbin-auth

Casbin Actix-web access control middleware

Home Page:https://github.com/casbin/casbin-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actix with diesel and self Auth middlewaze

vietlib opened this issue · comments

Can you create an example for Casbin Middlewaze with Model and Policy get from Postgres (Diesel) and self Auth please ?

Can you create an example for Casbin Middlewaze with Model and Policy get from Postgres (Diesel) and self Auth please ?

I am working on it. I will ping you when it is finished.

Can you create an example for Casbin Middlewaze with Model and Policy get from Postgres (Diesel) and self Auth please ?

We recommend using sqlx-adapter rather than diesel-adapter, because the sqlx-adapter is fully async. The demo will use sqlx-adapter and diesel(for app data) with PostgreSQL. We will also implement a JWT authentication middleware working with actix-casbin-auth.

@vietlib Sure, @hackerchai When you finish the example we can put in actix-web's casbin example and also casbin-rs's example directory

@vietlib Sure, @hackerchai When you finish the example we can put in actix-web's casbin example and also casbin-rs's example directory

Get it

Can you create an example for Casbin Middlewaze with Model and Policy get from Postgres (Diesel) and self Auth please ?

We recommend using sqlx-adapter rather than diesel-adapter, because the sqlx-adapter is fully async. The demo will use sqlx-adapter and diesel(for app data) with PostgreSQL. We will also implement a JWT authentication middleware working with actix-casbin-auth.

It's great if you can create full example on an app with postgres authentication and casbin-postgres Model.
Example like: user group must login to post an article and admin can publish it .
It so great ! Thank you so much !

Any update on thiss please

Any one working on it? @GopherJ @hackerchai @PsiACE

Any one working on it? @GopherJ @hackerchai @PsiACE

@hsluoyz Already done. I will close this issue.

Great, thanks!

We recommend using sqlx-adapter rather than diesel-adapter, because the sqlx-adapter is fully async. The demo will use sqlx-adapter and diesel(for app data) with PostgreSQL. We will also implement a JWT authentication middleware working with actix-casbin-auth.

Looks like the sqlx-adapter is forgotten.
Only
diesel-adapter = { version = "0.8.1", default-features = false, features = ["postgres","runtime-async-std"] }