utils

package
v0.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthAmbiguous = errors.New("auth: ambiguous authentication. may not use mTLS and JWT at the same time")
	ErrJWTInvalid    = errors.New("jwt: invalid")
	ErrJWTMissing    = errors.New("jwt: missing")
)

Functions

func AuthProcess

func AuthProcess(ctx context.Context, peerCerts []*x509.Certificate, token string) (*ajwt.Claims, error)

func NewServerTLSConfig

func NewServerTLSConfig(ctx context.Context, cquery CertGetter, sni string) (*tls.Config, error)

Types

type CertGetter

type CertGetter interface {
	GetMTLS(ctx context.Context) ([]tls.Certificate, error)
	GetCACerts(ctx context.Context, domain string) ([]tls.Certificate, error)
	atls.CertificateQuerier
}

type Claims

type Claims = ajwt.Claims

Claims is an alias for ajwt.Claims to expose it

func CreateBypassClaims

func CreateBypassClaims() *Claims

CreateBypassClaims creates permissive claims for contract manifest bypass mode

func CreateBypassClaimsWithIssuer

func CreateBypassClaimsWithIssuer(issuer string) *Claims

CreateBypassClaimsWithIssuer creates permissive claims with a specific issuer (owner address)

Jump to

Keyboard shortcuts

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