Code Monkey home page Code Monkey logo

Comments (4)

nicolaiarocci avatar nicolaiarocci commented on May 10, 2024

Thanks for your contribution. Did you check the latest development changelog? I think most of your ideas are already there in one form or another:

  1. Predefined db filters are essentially base queries. Plus, you can have multiple resources (API endpoints) targeting the same database collection
  2. You can have have public and private resources, and/or restricted/public methods
  3. According to REST principles a REST API is stateless so there's no auth.user.id concept that we can apply here (think no session variables). Each request will have to provide its own Authorization token.
  4. Current Auth implementation allows custom authorization logic by means of subclassing (v0.0.4) and, I'm probably going to add standard behavior (check the auth token against a configurable db collection containing username and hashed/salted passwords).

from eve.

nicolaiarocci avatar nicolaiarocci commented on May 10, 2024

838ca5f adds customizable role-based access control, which will allow for implementation of auth.user.id-like scenarios. The idea originated while brainstorming about your proposal so thank you!

from eve.

nicolaiarocci avatar nicolaiarocci commented on May 10, 2024

PS: look at the examples/security folder for some code snippets.

from eve.

asfaltboy avatar asfaltboy commented on May 10, 2024

Wow thanks for that! Roles is really a good idea and seems better suited for REST (no need add custom logic per view)

from eve.

Related Issues (20)

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.