jwx

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedJWT

type ParsedJWT struct {
	RawJWT []byte
	*jws.Message
}

ParsedJWT is a type extending jws.Message by holding the original jwt

func Parse

func Parse(data []byte) (*ParsedJWT, error)

Parse parses a jwt and returns a ParsedJWT

func (ParsedJWT) MarshalMsgpack

func (p ParsedJWT) MarshalMsgpack() ([]byte, error)

MarshalMsgpack implements the msgpack.Marshaler interface

func (*ParsedJWT) UnmarshalMsgpack

func (p *ParsedJWT) UnmarshalMsgpack(data []byte) error

UnmarshalMsgpack implements the msgpack.Unmarshaler interface

func (*ParsedJWT) VerifyType

func (p *ParsedJWT) VerifyType(typ string) bool

VerifyType verifies that the header typ has a certain value

func (*ParsedJWT) VerifyWithSet

func (p *ParsedJWT) VerifyWithSet(keys jwx.JWKS) ([]byte, error)

VerifyWithSet uses a jwk.Set to verify a *jws.Message, returning the decoded payload or an error

Jump to

Keyboard shortcuts

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