middleware

package
v0.0.0-...-5e2de36 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentUserKey = "current_user"
	SessionKey     = "session"

	TokenAttribute  = "token"
	UserIDAttribute = "user_id"
)

Variables

This section is empty.

Functions

func AuthWithConfig

func AuthWithConfig(config AuthConfig, jwtService fbjwt.API, userDB database.User) func(echo.HandlerFunc) echo.HandlerFunc

func UnauthWithConfig

func UnauthWithConfig(config UnauthConfig, jwtService fbjwt.API, userDB database.User) func(echo.HandlerFunc) echo.HandlerFunc

Types

type AuthConfig

type AuthConfig interface {
	JWTSecret() string
	LoginPath() string
}

type UnauthConfig

type UnauthConfig interface {
	JWTSecret() string
	RootPath() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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