jwthmac

package
v0.0.0-...-3ce7580 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHMACJWTToken

func BuildHMACJWTToken(payload []byte, expireAt time.Time, hmacKeyID string) (token string, err error)

usualy payload is the serialized protobuf message

func Get

func Get(keyID string) (secret string, ok bool, err error)

func Store

func Store(keyID string, secret string) (err error)

Types

type Utility

type Utility interface {
	BuildHMACJWTToken(payload []byte, expireAt time.Time, hmacKeyID string) (token string, err error)
	ParseHMACJWTToken(token string) (payload []byte, err error)
	Store(keyID string, secret string) (err error)
	Get(keyID string) (secret string, ok bool, err error)
}

Utility to build & sign JWT token using HMAC signing method with (with symetric key) It is used for simple email validation

var DefaultHandler Utility = hardcode.New()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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