authenticate

package
v0.0.0-...-7b45942 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthenticatedClaims = "AUTH_CLAIMS"
	AuthenticatedUser   = "AUTH_USER"
)
View Source
const (
	RefreshClaims = "REFRESH_CLAIMS"
	RefreshUser   = "REFRESH_USER"
)

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

Check the authentication status of given user.

func AuthenticateRefresh

func AuthenticateRefresh(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

func GetAuthenticatedClaim

func GetAuthenticatedClaim(c *gin.Context) (claims *jwt.CustomClaims, err error)

func GetAuthenticatedUser

func GetAuthenticatedUser(c *gin.Context) (user *models.UserModel, err error)

func GetRefreshClaims

func GetRefreshClaims(c *gin.Context) (claims *jwt.CustomClaims, err error)

func GetRefreshedUser

func GetRefreshedUser(c *gin.Context) (user *models.UserModel, err error)

func VerifyPassword

func VerifyPassword(
	maxCtxDuration time.Duration,
	svc *service.Service,
) (handler gin.HandlerFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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