auth

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 5 Imported by: 0

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