helpers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTokenValidity

func CheckTokenValidity(tokenStr string, secret string) (*jwt.Token, error)

func CheckValidityAndOwnerForRefreshToken

func CheckValidityAndOwnerForRefreshToken(tokenStr string, ownerId int64, secret string) error

func ClearTokensCookies

func ClearTokensCookies(w http.ResponseWriter)

func CreatePermissionsString

func CreatePermissionsString(permissions []data.ModulePermission) (string, error)

func GenerateAccessToken

func GenerateAccessToken(dataToGenerate data.GenerateTokens) (string, error)

func GenerateRefreshToken

func GenerateRefreshToken(dataToGenerate data.GenerateTokens) (string, error, *data.JwtClaims)

func ParseDurationStringToUnix

func ParseDurationStringToUnix(timeStr string) int64

func RetrieveClaimsFromJwtString

func RetrieveClaimsFromJwtString(tokenStr string, secret string) (*data.JwtClaims, error)

func SetTokensCookies

func SetTokensCookies(w http.ResponseWriter, access, refresh string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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