lmw

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowOptionsMW

func AllowOptionsMW() lcom.Handler

AllowOptionsMW is a helper middleware function that will immediately return a successful request if the method is OPTIONS. This makes sure that HTTP OPTIONS calls for CORS functionality are supported.

func DecodeExpandedMW

func DecodeExpandedMW(next lcom.Handler) lcom.Handler

DecodeExpandedMW attempts to parse a Json Web Token from the request's "Authorization" header. If the Authorization header is missing, or does not contain a valid Json Web Token (JWT) then an error message and appropriate HTTP status code will be returned. If the JWT is correctly set and contains an instance of ExpandedClaims then the values from that standard claim will be added to the context object for others to use during their processing.

func DecodeStandardMW

func DecodeStandardMW(next lcom.Handler) lcom.Handler

DecodeStandardMW attempts to parse a Json Web Token from the request's "Authorization" header. If the Authorization header is missing, or does not contain a valid Json Web Token (JWT) then an error message and appropriate HTTP status code will be returned. If the JWT is correctly set and contains a StandardClaim then the values from that standard claim will be added to the context object for others to use during their processing.

func InjectLambdaContextMW

func InjectLambdaContextMW(next lcom.Handler) lcom.Handler

InjectLambdaContextMW with do exactly that - inject all appropriate lambda values into the local context so that other users down the line can query the context for things like HTTP method or Path

func LogRequestMW

func LogRequestMW(next lcom.Handler) lcom.Handler

Types

This section is empty.

Directories

Path Synopsis
Package ljwt appends critical libraries necessary for using JWTs (Json Web Tokens) within AWS Lambda through API Gateway proxy requests / integration.
Package ljwt appends critical libraries necessary for using JWTs (Json Web Tokens) within AWS Lambda through API Gateway proxy requests / integration.

Jump to

Keyboard shortcuts

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