jwtauth

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package jwtauth verifies HMAC tokens during signing-key rotation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier accepts the signing key and additional verification-only keys. It is immutable and safe for concurrent use.

func NewVerifier

func NewVerifier(signingSecret string, verificationSecrets []string, meter metric.Meter) (*Verifier, error)

func (*Verifier) ParseWithClaims

func (v *Verifier) ParseWithClaims(ctx context.Context, tokenString string, claims jwt.Claims) (*jwt.Token, error)

ParseWithClaims preserves JWT claim validation and only tries another key on a signature mismatch. Callers still enforce revocation and authorization.

Jump to

Keyboard shortcuts

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