authentication

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AccessTokenExpireTime = time.Duration(2) * time.Hour
View Source
const AccessTokenKey string = "AccessToken"
View Source
const RefreshTokenExpireTime = time.Duration(24) * time.Hour
View Source
const RefreshTokenKey string = "RefreshToken"

Variables

This section is empty.

Functions

func Refresh

func Refresh() http.HandlerFunc

func SignIn

func SignIn(db *gorm.DB) http.HandlerFunc

func Welcome

func Welcome() http.HandlerFunc

Types

type Claims

type Claims struct {
	Username string `json:"user_name"`
	jwt.StandardClaims
}

type Credentials

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

Jump to

Keyboard shortcuts

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