auth

package
v0.0.0-...-5d294c8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTokenInvalid = errors.New("token is invalid")
)

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(db *gorm.DB) *AuthService

func (*AuthService) GetJWTToken

func (as *AuthService) GetJWTToken(dto *dtos.LoginRequestDTO) (string, error)

func (*AuthService) RefreshJWTToken

func (as *AuthService) RefreshJWTToken(token string) (string, error)

func (*AuthService) VerifyJWTToken

func (as *AuthService) VerifyJWTToken(token string) error

type Claims

type Claims struct {
	jwt.RegisteredClaims
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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