jws

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignFunc

type SignFunc func(t *Token, signingInput []byte) ([]byte, error)

type Token

type Token struct {
	Header    common.Header
	Payload   common.Payload
	Signature common.Signature
	SignFunc
	ValidateFunc
	Key []byte
	Raw string
}

func New

func New(alg common.AlgorithmType, claims common.ClaimSet, key []byte) (*Token, error)

func (*Token) Decode

func (t *Token) Decode(parts []string) error

func (*Token) Encode

func (t *Token) Encode() (string, error)

func (*Token) Validate

func (t *Token) Validate() (bool, error)

type ValidateFunc

type ValidateFunc func(t *Token) (bool, error)

Jump to

Keyboard shortcuts

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