jws

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jws represents content secured with digitalsignatures using JSON-based data structures as specified by rfc7515

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHS256Signer

func NewHS256Signer(key []byte) (encoding.MarshalUnmarshaler, error)

NewHS256Signer creates a SHA256 JWT signer from a 32 byte key.

Types

type JSONWebSigner

type JSONWebSigner struct {
	Signer jose.Signer
	// contains filtered or unexported fields
}

JSONWebSigner is the struct representing a signed JWT. https://tools.ietf.org/html/rfc7519

func (*JSONWebSigner) Marshal

func (c *JSONWebSigner) Marshal(x interface{}) ([]byte, error)

Marshal signs, and serializes a JWT.

func (*JSONWebSigner) Unmarshal

func (c *JSONWebSigner) Unmarshal(value []byte, s interface{}) error

Unmarshal parses and validates a signed JWT.

Jump to

Keyboard shortcuts

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