wavejwt

package
v0.14.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssuerWaveTerm = "waveterm"
)

Variables

This section is empty.

Functions

func GetPublicKey

func GetPublicKey() []byte

func GetPublicKeyBase64

func GetPublicKeyBase64() string

func SetPrivateKey

func SetPrivateKey(keyData []byte) error

func SetPublicKey

func SetPublicKey(keyData []byte) error

func Sign

func Sign(claims *WaveJwtClaims) (string, error)

Types

type KeyPair

type KeyPair struct {
	PublicKey  []byte
	PrivateKey []byte
}

func GenerateKeyPair

func GenerateKeyPair() (*KeyPair, error)

type WaveJwtClaims

type WaveJwtClaims struct {
	jwt.RegisteredClaims
	MainServer bool   `json:"mainserver,omitempty"`
	Sock       string `json:"sock,omitempty"`
	RouteId    string `json:"routeid,omitempty"`
	ProcRoute  bool   `json:"procroute,omitempty"`
	BlockId    string `json:"blockid,omitempty"`
	JobId      string `json:"jobid,omitempty"`
	Conn       string `json:"conn,omitempty"`
	Router     bool   `json:"router,omitempty"`
}

func ValidateAndExtract

func ValidateAndExtract(tokenStr string) (*WaveJwtClaims, error)

Jump to

Keyboard shortcuts

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