jwtutil

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidJWTMutations = apierrors.Invalid.WithReason("InvalidJWTMutations")

Functions

func ApplyMutations

func ApplyMutations(
	forMutation map[string]interface{},
	forBackup map[string]interface{},
) (applied jwt.Token, err error)

func BuildFromMap

func BuildFromMap(m map[string]interface{}) (jwt.Token, error)

func PrepareForMutations

func PrepareForMutations(t jwt.Token) (
	forMutation map[string]interface{},
	forBackup map[string]interface{},
	err error,
)

func Sign

func Sign(t jwt.Token, alg jwa.SignatureAlgorithm, key interface{}) (token []byte, err error)

func SignWithHeader

func SignWithHeader(t jwt.Token, hdr jws.Headers, alg jwa.SignatureAlgorithm, key interface{}) (token []byte, err error)

func SplitWithoutVerify

func SplitWithoutVerify(compact []byte) (hdr jws.Headers, payload jwt.Token, err error)

SplitWithoutVerify deserializes compact into hdr and payload.

func ToMap

func ToMap(t jwt.Token) (map[string]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