middleware

package
v0.0.0-...-271498a Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessKey []byte

AccessKey ...

View Source
var AccessKeyTTL int

AccessKeyTTL ...

View Source
var AuthID uint64

AuthID - Access details

View Source
var Email string

Email - Access details

View Source
var RefreshKey []byte

RefreshKey ...

View Source
var RefreshKeyTTL int

RefreshKeyTTL ...

Functions

func CORS

func CORS() gin.HandlerFunc

CORS middleware

func Firewall

func Firewall(listType string, ipList string) gin.HandlerFunc

Firewall ...

func GetJWT

func GetJWT(id uint64, email string, tokenType string) (string, error)

GetJWT ...

func JWT

func JWT() gin.HandlerFunc

JWT ...

func Pongo2

func Pongo2() gin.HandlerFunc

Pongo2 - uses the Pongo2 template library https://github.com/flosch/pongo2 to render templates

func RefreshJWT

func RefreshJWT() gin.HandlerFunc

RefreshJWT ...

func SentryCapture

func SentryCapture(sentryDsn string) gin.HandlerFunc

SentryCapture ...

Types

type JWTPayload

type JWTPayload struct {
	AccessJWT  string `json:"AccessJWT"`
	RefreshJWT string `json:"RefreshJWT"`
}

JWTPayload ...

type MyCustomClaims

type MyCustomClaims struct {
	ID    uint64 `json:"Id"`
	Email string `json:"Email"`
	jwt.StandardClaims
}

MyCustomClaims ...

Jump to

Keyboard shortcuts

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