Categorygithub.com/extrame/jose
modulepackage
0.0.0-20230713040001-a8d6daaf8143
Repository: https://github.com/extrame/jose.git
Documentation: pkg.go.dev

# README

JOSE

Build Status GoDoc

JOSE is a comprehensive set of JWT, JWS, and JWE libraries.

Why

The only other JWS/JWE/JWT implementations are specific to JWT, and none were particularly pleasant to work with.

These libraries should provide an easy, straightforward way to securely create, parse, and validate JWS, JWE, and JWTs.

Notes:

JWE is currently unimplemented.

Version 0.9:

Documentation

The docs can be found at [godoc.org] docs, as usual.

A gopkg.in mirror can be found at https://gopkg.in/jose.v1, thanks to @zia-newversion. (For context, see issue #30.)

JWS RFC

JWE RFC

JWT RFC

License

[MIT] license.

# Packages

Package crypto implements "SigningMethods" and "EncryptionMethods"; that is, ways to sign and encrypt JWS and JWEs, respectively, as well as JWTs.
Package jws implements JWSs per RFC 7515.
Package jwt implements JWTs per RFC 7519.

# Functions

Base64Decode decodes a base64-encoded byte slice.
Base64Encode encodes a byte slice.
DecodeEscaped decodes a base64-encoded byte slice straight from a JSON structure.
EncodeEscape base64-encodes a byte slice but escapes it for JSON.
Now returns the current time in UTC.

# Interfaces

Encoder is satisfied if the type can marshal itself into a valid structure for a JWS.

# Type aliases

Header implements a JOSE Header with the addition of some helper methods, similar to net/url.Values.
Protected Headers are base64-encoded after they're marshaled into JSON.