jwt-auth-subreq

command module
v0.0.0-...-97aa92a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 12 Imported by: 0

README

jwt-auth-subreq

Authorizes JWT for nginx through subrequests

A quick and sloppy service I whipped up adapting Cloudflare's Example for my own personal use.

usage: jwt-auth-subreq --auth-domain=AUTH-DOMAIN --audience=AUDIENCE [<flags>]


Flags:
  --help                     Show context-sensitive help (also try --help-long
                             and --help-man).
  --auth-domain=AUTH-DOMAIN  the Cloudflare auth domain to request certs from
  --audience=AUDIENCE        the expected audience of the JWT token
  --address=::               address to listen for requests on
  --port=3000                port to listen on
  --debug                    enable logging of requests

Usage with nginx:

server {
  ...

  location / {
    auth_request /_auth;
    ...
  }

  location = /_auth {
    internal;
    proxy_pass http://localhost:3000;
    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
    proxy_set_header X-Original-URI $request_uri;
  }

  ...
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL