security

package
v0.0.0-...-52a41df Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTokenTime

func CreateTokenTime(addMinute time.Duration) int64

func GenerateDetachedJws

func GenerateDetachedJws(jsonBody string, signingMethod jwt.SigningMethod) (string, error)

func GenerateJwtWithClaims

func GenerateJwtWithClaims(claims jwt.MapClaims, signingMethod jwt.SigningMethod) (string, error)

func GenerateJwtWithJsonString

func GenerateJwtWithJsonString(jsonBody string, signingMethod jwt.SigningMethod) (string, error)

func GetPrivateKey

func GetPrivateKey(cacheId, keyAddress string) (*rsa.PrivateKey, error)

func GetSecretKey

func GetSecretKey(cacheId, keyAddress string) ([]byte, error)

func VerifyJwt

func VerifyJwt(tokenString string, signingMethod jwt.SigningMethod, key interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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