auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AccessTokenLifetime = time.Hour

How long an access token will remain valid (1 hour)

View Source
const RefreshTokenLifetime = time.Hour * 24 * 30

How long a refresh token will remain valid (30 days)

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(userID string, lifetime time.Duration, secret string) (string, error)

func VerifyToken

func VerifyToken(token, secret string) (*jwt.MapClaims, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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