middleware

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Auth

type S3Auth struct {
	// contains filtered or unexported fields
}

S3Auth middleware for performing validation of signed requests

func NewS3AuthMiddleware

func NewS3AuthMiddleware(mortConfig *config.Config) *S3Auth

NewS3AuthMiddleware returns S3 compatible authorization handler it can handle AWS v2 (S3 mode) and AWS v4 (only header mode without streaming)

func (*S3Auth) Handler

func (s *S3Auth) Handler(next http.Handler) http.Handler

Handler main method of S3AuthMiddleware it check if request should be signed. If so it create copy of request and calculate signature and compare result with user request if signature is correct request is passed to next handler otherwise it return 403

Jump to

Keyboard shortcuts

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