Giter Club home page Giter Club logo

security-jwt-perm_eval's Introduction

REST Api with usage PermissionEvaluator and JWT

Introduction

This REST-Api demo application created in order to learn and understand the mechanism of managing Authentication with usage JWT and Authorization implementing PermissionEvaluator. Most of examples in net use regular Java Collections to store data entities. It causes inability to write reliable tests. This certain example uses JPA module with Hibernate for data persisting in H2 Database.

Entity Relations

Imagine the organization which has several warehouses of different kind: CC, XD, TXD. Each warehouse has two types of trucks within it: TTT - for inbound and TPA - for outbound. Each truck has Manifest entities inside which represent a cargo loaded into the trucks. This organization has several kinds of users with different authorities for each kind of warehouses. Also these users has certain accesses for particular warehouses to process different CRUD actions. That's why PermissionEvaluator was used. All these entities: Warehouse, TPA, TTT, Manifest, User are being stored in H2. Only relations WarehousePermission are stored in WarehousePermissionRepo with usage of the ArrayList. All relation between objects initiated in DbInit class.

Technologies

  • Spring Security JWT
  • Spring Security PermissionEvaluator
  • Spring JPA Data
  • Hibernate
  • Maven
  • Lombok
  • Junit4 for tests

Sources

The code was created using rjozefowich and dangeabunea repositories.

security-jwt-perm_eval's People

Contributors

nickl0gist avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kelsas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.