# README
auth
import "github.com/coralproject/shelf/internal/platform/midware/auth"
Overview
Index
- Variables
- func Midware(publicKeyBase64Str string, config MidwareOpts) (web.Middleware, error)
- type MidwareOpts
Package files
Variables
var ErrInvalidToken = errors.New("invalid token")
ErrInvalidToken is returned when the token provided is not valid.
func Midware
func Midware(publicKeyBase64Str string, config MidwareOpts) (web.Middleware, error)
Midware handles token authentication for external authentication sources.
type MidwareOpts
type MidwareOpts struct {
// AllowQueryString is true when we want to allow accessing the tokenString
// from the query string as a fallback.
AllowQueryString bool
}
MidwareOpts describes the options for configuring the Midware.
Generated by godoc2md
# Functions
Midware handles token authentication for external authentication sources.
# Variables
ErrInvalidToken is returned when the token provided is not valid.
# Structs
MidwareOpts describes the options for configuring the Midware.