middleware

package
v0.0.0-...-f15f0a0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: GPL-3.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionDataKey = struct{ key string }{/* contains filtered or unexported fields */}

SessionDataKey represents the key of JWT claim value stored in a context.

Functions

func AuthenticateCreateUser

func AuthenticateCreateUser(app *inits.App) gin.HandlerFunc

AuthenticateCreateUser authenticates the user session and adds user if user does not exist.

func PanicHandler

func PanicHandler(ctx *gin.Context, err interface{})

PanicHandler logs all panics from rest endpoints.

Sec: DON'T log requests because of sensitive data.

Types

type SessionData

type SessionData struct {
	User   *resource.User
	Claims *security.Claims
}

SessionData represents sessionuser data.

Jump to

Keyboard shortcuts

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