auth

package
v0.0.0-...-e3263a0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecret

func GetSecret() string

func HandleAuth

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

func Validate

func Validate(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