jose

package
v0.0.0-...-a8a8e01 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWKSet

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

JWKSet manages keys and allows encoding and decoding JWTs.

func LoadJWKSet

func LoadJWKSet(data []byte) (*JWKSet, error)

LoadJWKSet creates a JWKSet using the given json-encoded data EXPORT LoadJWKSet

func (*JWKSet) Decode

func (s *JWKSet) Decode(data string, v interface{}) error

Decode verifies the given data (JWT) and decodes it into v.

func (*JWKSet) Encode

func (s *JWKSet) Encode(kid string, v interface{}) (string, error)

Encode creates a JWT from the given data, signed using the key at the given key id.

func (*JWKSet) KeyIDs

func (s *JWKSet) KeyIDs() []string

KeyIDs returns all key ids in this JWK set in the order they were added.

func (*JWKSet) VerifiersJSON

func (s *JWKSet) VerifiersJSON() []byte

VerifiersJSON returns the JSON encoded JWK set containing all asymmetric verifiers.

Jump to

Keyboard shortcuts

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