firewall

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package firewall provides authentication for NeuralTrust Firewall clients.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConfigured = errors.New("firewall: token provider not configured")

ErrNotConfigured is returned when a token is requested without a secret key.

Functions

This section is empty.

Types

type TokenProvider

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

TokenProvider mints and caches short-lived Firewall JWTs.

func NewTokenProvider

func NewTokenProvider(secretKey string) *TokenProvider

NewTokenProvider builds a Firewall token provider.

func (*TokenProvider) Configured

func (p *TokenProvider) Configured() bool

Configured reports whether the provider has a signing key.

func (*TokenProvider) Invalidate

func (p *TokenProvider) Invalidate()

Invalidate clears the cached token.

func (*TokenProvider) Token

func (p *TokenProvider) Token() (string, error)

Token returns a cached token or mints a new one before the cached token expires.

Jump to

Keyboard shortcuts

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