auth

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package auth provides a common auth middleware based on the request header 'Authorization'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorization

func Authorization(handle func(authtype, authvalue string, header http.Header) error) middleware.Middleware

Authorization returns a common middleware named "auth", which parses the request header "Authorization" to two fields, authtype(optional) and authvalue(required), and calls the handle function to finish the authorization that it maybe put them into the header if there some auth information to be passed to the upstream server.

Types

This section is empty.

Directories

Path Synopsis
Package forward provides a middleware that forward the auth to the external server.
Package forward provides a middleware that forward the auth to the external server.

Jump to

Keyboard shortcuts

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