auth

package
v0.0.0-...-bc034c2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerAuth

func HandlerAuth(fn authenticateFunc) func(http.ResponseWriter, *http.Request)

func Middleware

func Middleware(next http.Handler) http.Handler

Types

type Authenticated

type Authenticated interface {
	GetID() int64
	GetName() string
}

type Claims

type Claims struct {
	UserID   int64  `json:"user_id"`
	UserName string `json:"user_name"`
	jwt.RegisteredClaims
}

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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