auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAccessToken

func GenerateAccessToken(user models.User) (string, error)

same as the refresh token except we dont use the custom key and we add an expiration time of 1 hour to this we also use a different private key of course

func GenerateRefreshToken

func GenerateRefreshToken(user models.User) (string, error)

Types

type AccessTokenCustomClaims

type AccessTokenCustomClaims struct {
	UserID  string
	KeyType string
	jwt.StandardClaims
}

type RefreshTokenCustomClaims

type RefreshTokenCustomClaims struct {
	UserID    string
	CustomKey string
	KeyType   string
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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