authreq

package
v0.0.0-...-2818d54 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package authreq signa and verifies HTTP requests using Ed25519 private/public keys

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsFromRequest

func ClaimsFromRequest(r *http.Request) *jwt.RegisteredClaims

ClaimsFromRequest returns the JWT claims object associated with the HTTP request (if any)

func Sign

func Sign(req *http.Request, key ed25519.PrivateKey) (*http.Request, error)

Sign signs the HTTP request with a Ed25519 private key

func VerifyMiddleware

func VerifyMiddleware(next httprouter.Handle) httprouter.Handle

VerifyMiddleware is a httprouter.handler middleware that verifies HTTP requests previously signed with a Ed25519 private key

Types

This section is empty.

Jump to

Keyboard shortcuts

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