Spring Security example for jCasbin

Clone this repo:

Branches

  1. 85c8488 feat: update README.md (#12) by Liao Xin · 1 year, 5 months ago master v1.1.0
  2. 030cd1d feat: fix pom.xml to fix CI for publishing to https://central.sonatype.com (#11) by Liao Xin · 1 year, 5 months ago v1.0.0
  3. 32c3557 feat: improve README.md by Yang Luo · 1 year, 6 months ago
  4. 021cbef feat: fix pom.xml by Yang Luo · 2 years ago
  5. 3bdf32a feat: add missing maven-settings.xml and distributionManagement by Yang Luo · 2 years ago

casbin-spring-security-starter

License Maven Central

Installation

<dependency>
    <groupId>org.casbin</groupId>
    <artifactId>casbin-spring-security-starter</artifactId>
    <version>1.0.0</version>
</dependency>

inform

To skip the tedious and complicated login process of Spring Security, 
we're using its built-in login mode, which allows us to focus on the model authentication module.

DataBase

For the database, we're using mysql. 
Remember to create a casbin database if you don't have one, and configure it in the application.yml file.

Simple Example

check file examples.rbac.policy.csv you can find out we are using rbac model
I registered with the identity of Alice who can read data1

img_1.png

Than test the  result

img_2.png

img_3.png