secretaddon

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JwtHeaderKid = "kid"
	JwtHeaderAlg = "alg"
)

Variables

View Source
var (
	ErrJwtInvalidAlgCombination = errors.New("invalid algorithm combination")
)

Functions

This section is empty.

Types

type AddonTool

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

func NewAddonTool

func NewAddonTool(keyStorage secretapi.KeyStorage) *AddonTool

func (*AddonTool) SignJwtToken

func (a *AddonTool) SignJwtToken(keyName string, jwtAlg JwtAlg, claims map[string]interface{}) (string, error)

func (*AddonTool) VerifyJwtToken

func (a *AddonTool) VerifyJwtToken(tokenString string) (map[string]interface{}, error)

type JwtAlg

type JwtAlg string
const (
	JwtAlgHS256 JwtAlg = "HS256"
	JwtAlgHS384 JwtAlg = "HS384"
	JwtAlgHS512 JwtAlg = "HS512"
	JwtAlgRS256 JwtAlg = "RS256"
	JwtAlgRS384 JwtAlg = "RS384"
	JwtAlgRS512 JwtAlg = "RS512"
	JwtAlgPS256 JwtAlg = "PS256"
	JwtAlgPS384 JwtAlg = "PS384"
	JwtAlgPS512 JwtAlg = "PS512"
	JwtAlgES256 JwtAlg = "ES256"
	JwtAlgES384 JwtAlg = "ES384"
	JwtAlgES512 JwtAlg = "ES512"
)

Jump to

Keyboard shortcuts

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