middleware

package
v0.14.7-rc1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SECERTKEY = "its my precious"
View Source
const UserNameParam = "userName"

Variables

This section is empty.

Functions

func BaseAuth

func BaseAuth(next http.Handler) http.Handler

func CheckRequestID

func CheckRequestID(next http.Handler) http.Handler

func GenerateToken

func GenerateToken(userName string, password string) (string, error)

func MethodNotAllowed

func MethodNotAllowed(w http.ResponseWriter, req *http.Request)

func NotFound

func NotFound(w http.ResponseWriter, req *http.Request)

func Recoverer

func Recoverer(next http.Handler) http.Handler

Types

type JWT

type JWT struct {
	Sigkey []byte
}

func (*JWT) CreateToken

func (j *JWT) CreateToken(claim PaddleFlowClaims) (string, error)

func (*JWT) ParseToken

func (j *JWT) ParseToken(tokenString string) (*PaddleFlowClaims, error)

type PaddleFlowClaims

type PaddleFlowClaims struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	jwtgo.StandardClaims
}

Jump to

Keyboard shortcuts

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