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, issuer string) (encoding.MarshalUnmarshaler, error)
NewHS256Signer creates a SHA256 JWT signer from a 32 byte key.
Types ¶
type JSONWebSigner ¶
type JSONWebSigner struct { Signer jose.Signer Issuer string // 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.
Click to show internal directories.
Click to hide internal directories.