jwt

package
v0.0.0-...-8d6ec7d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EXPIRATION_TIME = time.Now().Add(time.Minute * 5).Unix()
View Source
var MY_SECRET = []byte("secretkey")
View Source
var PASSWORD = generatedHashPassword("classification")
View Source
var USERNAME = "triangle"

Functions

This section is empty.

Types

type JwtTokenImpl

type JwtTokenImpl struct{}

func (*JwtTokenImpl) GenerateToken

func (j *JwtTokenImpl) GenerateToken(username string, password string) (*domain.Authentication, error)

func (*JwtTokenImpl) ValidateCredentials

func (j *JwtTokenImpl) ValidateCredentials(username string, password string) bool

func (*JwtTokenImpl) ValidateToken

func (j *JwtTokenImpl) ValidateToken(token string) bool

type UniqueClaims

type UniqueClaims struct {
	jwt.StandardClaims
	TokenId string `json:"jti,omitempty"`
}

Jump to

Keyboard shortcuts

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