BTBurke / caddy-jwt

JWT middleware for the Caddy server
MIT License
114 stars 39 forks source link

Multiple auth provider trust. #27

Closed Shadowfaxenator closed 7 years ago

Shadowfaxenator commented 7 years ago

Is there any way to add several public keys to verify JWT? I want to trust multiple hosts which provide JWT tokens.

BTBurke commented 7 years ago

Do you mean for a single site? Currently there's no way to specify multiple public keys. What's the use case for this? Is it for JWTs that may be issued by different third-party services?

Shadowfaxenator commented 7 years ago

Yes exactly. To trust several providers

BTBurke commented 7 years ago

Ok I think this is pretty straightforward. The best way would probably be to allow multiple publickey declarations like:

publickey /path/to/first.key
publickey /path/to/second.key
BTBurke commented 7 years ago

This is implemented now in v2.6.0. Use the multiple declaration syntax in my comment above to use it.