This page is about Caddy 1 and will stay here forever.

User Guide


This middleware implements an authorization layer for Caddy based on JSON Web Tokens (JWT).

Full documentation


Basic Syntax
jwt [path]

By default every resource under path will be secured using JWT validation. To specify a list of resources that need to be secured, use multiple declarations. Be sure to read the plugin documentation to properly configure your server to validate your tokens.

Advanced Syntax
jwt { path [path] redirect [location] allow [claim] [value] deny [claim] [value] }

You can optionally use claim information to further control access to your routes. In a jwt block you can specify rules to allow or deny access based on the value of a claim. You can also specify a redirect URL so that invalid tokens can be sent to a login page. Check out the plugin documentation for more information about how to use the advanced syntax. It has more detailed examples of how the plugin will pass claims to your application.

Related Links

Access the full documentation for this plugin off-site:

Plugin Help

Get help from the maintainers of the http.jwt plugin:

Plugin Website

Visit http.jwt's website for more information:

Plugin Author: Bryan Burke
Last Updated: 25 Mar 2017, 1:05 PM
This plugin is independent of the Caddy project and is not endorsed or maintained by Caddy developers. Use at your own risk. Do not file issues for this plugin on Caddy's bug tracker.