jwtmiddleware

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(ctx context.Context, config *gcpjwt.IAMConfig, audience string) func(http.Handler) http.Handler

NewHandler will return a middleware that will try and validate tokens in incoming HTTP requests. The token is expected as a Bearer token in the Authorization header and expected to have an Issuer claim equal to the ServiceAccount the provided IAMConfig is configured for. This will also validate the Audience claim to the one provided, or use https:// + request.Host if blank. NOTE: If using the signJwt method, you MUST call gcpjwt.SigningMethodIAMJWT.Override().

Complimentary to https://github.com/someone1/gcp-jwt-go/oauth2

Types

This section is empty.

Jump to

Keyboard shortcuts

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