BTBurke / caddy-jwt

JWT middleware for the Caddy server
MIT License
113 stars 40 forks source link

[WIP] RSA support and flatten claim map #15

Closed lsjostro closed 7 years ago

lsjostro commented 7 years ago

Hi, I would like to contribute RSA support.

The PR also include flattening of the claim map. This helps where you have "complex" payloads like maps in maps. you may then reference from to the field with dots.

example jwt payload:

"context": {
  "user": { 
    "username": "foobar", 
    "role": ["admin", "baz"] 
   }
}

Would become in Caddyfile:

jwt {
  path /foo
  allow context.user.username foobar
  allow context.role.0 admin
}

Please review. tests are in the making.

BTBurke commented 7 years ago

Hey Lars, thanks for the contribution. I'll merge this once we fix the contains function that I merged yesterday and we add some tests. We will also need to update the README to add instructions for how to configure the RS-family algorithms.

lsjostro commented 7 years ago

cool, just need to add some test for the RSA support and update README I guess.

lsjostro commented 7 years ago

@BTBurke please have another look. :)

lsjostro commented 7 years ago

ping @BTBurke. 😃

lsjostro commented 7 years ago

yay! Thanks!

BTBurke commented 7 years ago

Thanks for the contribution. I think you'll have to build from source to get this version in Caddy until the next caddy release comes out. On Monday, January 30, 2017 at 8:37 AM Lars Sjöström notifications@github.com wrote:

yay! Thanks!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.