auth

package
v0.65.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 5 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

Overview

Package auth contains exported proxy auth values. These are used to ensure coherent usage across management and proxy implementations.

Index

Constants

View Source
const (
	SessionCookieName    = "nb_session"
	DefaultSessionExpiry = 24 * time.Hour
	SessionJWTIssuer     = "netbird-management"
)

Variables

This section is empty.

Functions

func ResolveProto

func ResolveProto(forwardedProto string, conn *tls.ConnectionState) string

ResolveProto determines the protocol scheme based on the forwarded proto configuration. When set to "http" or "https" the value is used directly. Otherwise TLS state is used: if conn is non-nil "https" is returned, else "http".

func ValidateSessionJWT

func ValidateSessionJWT(tokenString, domain string, publicKey ed25519.PublicKey) (userID, method string, err error)

ValidateSessionJWT validates a session JWT and returns the user ID and method.

Types

type Method

type Method string
var (
	MethodPassword Method = "password"
	MethodPIN      Method = "pin"
	MethodOIDC     Method = "oidc"
)

func (Method) String

func (m Method) String() string

Jump to

Keyboard shortcuts

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