httpsig

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlgMismatchError

func IsAlgMismatchError(err error) bool

func IsInvalidSignatureError

func IsInvalidSignatureError(err error) bool

func IsMalformedSignatureError

func IsMalformedSignatureError(err error) bool

func IsNotSignedError

func IsNotSignedError(err error) bool

func IsSignatureExpiredError

func IsSignatureExpiredError(err error) bool

func IsUnknownKeyError

func IsUnknownKeyError(err error) bool

func NewSignTransport

func NewSignTransport(transport http.RoundTripper, opts ...signOption) http.RoundTripper

NewSignTransport returns a new client transport that wraps the provided transport with http message signing and body digest creation

func NewVerifyMiddleware

func NewVerifyMiddleware(opts ...verifyOption) func(http.Handler) http.Handler

NewVerifyMiddleware returns a configured http server middleware that can be used to wrap multiple handlers for http message signature and digest verification.

TODO: form and multipart support

func WithHeaders

func WithHeaders(hdr ...string) signOption

TODO: use this to implement required headers in verify?

func WithHmacSha256

func WithHmacSha256(keyID string, secret []byte) signOrVerifyOption

func WithSignEcdsaP256Sha256

func WithSignEcdsaP256Sha256(keyID string, pk *ecdsa.PrivateKey) signOption

func WithSignRsaPssSha512

func WithSignRsaPssSha512(keyID string, pk *rsa.PrivateKey) signOption

func WithVerifyEcdsaP256Sha256

func WithVerifyEcdsaP256Sha256(keyID string, pk *ecdsa.PublicKey) verifyOption

func WithVerifyRsaPssSha512

func WithVerifyRsaPssSha512(keyID string, pk *rsa.PublicKey) verifyOption

Types

This section is empty.

Jump to

Keyboard shortcuts

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