jws

package
v7.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSigner        = errors.New("missing signer")
	ErrUnsupportedAlgorithm = errors.New("unsupported algorithm")
)

Functions

func ExtractClaims

func ExtractClaims(token string, claims interface{}) error

ExtractClaims parses a signed JWT and unmarshals the payload into the supplied claims The signature is NOT checked so these claims are unverified. This function exists because the JOSE library fails when parsing a signed token with a non-string nonce, AM requires an integer nonce

func JWAFromKey

func JWAFromKey(s crypto.Signer) (alg jose.SignatureAlgorithm, err error)

JWAFromKey attempts to deduce the signing algorithm by looking at the public key

func NewSigner

func NewSigner(key crypto.Signer, opts *jose.SignerOptions) (jose.Signer, error)

NewSigner creates a new JOSE signer from the crypto signer

Types

This section is empty.

Jump to

Keyboard shortcuts

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