Coder Social home page Coder Social logo

Comments (4)

BTBurke avatar BTBurke commented on August 22, 2024

from caddy-jwt.

smancke avatar smancke commented on August 22, 2024

Hi Bryan,

yes, this one is not so obvious, so I'm talking about this first, before doing a PR ;-)

I think, you have misunderstood, my objective. I don't want a simple syntax for multiple rules.
What I want to implement is the support for list types within the JWT claim. In my case, a user can be part of multiple groups. And I want to check, if the user is at least part of one group.
e.g.

{
  "sub": "bob",
  "groups": ["admin", "user", "operator"]
}

If I read you comment, I think for the configuration part it would be the best, not to introduce any special syntax for lists, but just use the given syntax and do a contains check in the cases, where the claim is a list. e.g.

ALLOW groups admin

This way, the configuration would stay pretty simple.

from caddy-jwt.

smancke avatar smancke commented on August 22, 2024

Hi Bryan,

I continued with implementing this, because I'll now need this for a project of mine. Looks fine for me.
For me, it looks very understandable and straight forward. What do you think about it?

It adds up in PR #13, because I did not separate both things in branches. If you prefer, I can separate both commits.

from caddy-jwt.

BTBurke avatar BTBurke commented on August 22, 2024

Merged. Thanks for the contribution.

from caddy-jwt.

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.