Comments (4)
from caddy-jwt.
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.
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.
Merged. Thanks for the contribution.
from caddy-jwt.
Related Issues (20)
- Multiple auth provider trust. HOT 4
- Extra claims from auth0 cause invalid headers HOT 8
- Refactor
- Possible minor error in a message (keys.go) HOT 1
- Validate multiple claims in an allow rule? HOT 1
- Loading cookie with alternative name HOT 7
- Set referer header on redirect HOT 3
- Protect an exact path HOT 4
- Response after succesful login: www-authenticate header: Bearer realm="",error="invalid_token" HOT 6
- Using placeholders for allow directive HOT 2
- Support for other Authorization header formats HOT 1
- JWT signed with H256 results in a 401 HOT 3
- Build fails with new module-based build server HOT 2
- Caddy's import path has changed
- Question about releases HOT 1
- Take http status code as a configuration value HOT 4
- Caddy 2 port HOT 36
- go mod errors with "version "v3.7.2" invalid" when requiring this package HOT 2
- Advice on secret file format for HMAC HOT 2
- allow access for groups HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-jwt.