auth

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package auth provides netclient auth logic with server

Index

Constants

This section is empty.

Variables

View Source
var ErrMDMDenied = errors.New("device not enrolled or compliant in MDM")

ErrMDMDenied is returned (via wrapping) when the netmaker server refuses a request because the host is not enrolled or compliant in the configured MDM. Callers should detect it with errors.Is and surface MDMDeniedMessage to the operator instead of a generic transport error.

Functions

func AsMDMDenied added in v1.7.0

func AsMDMDenied(err error) error

AsMDMDenied returns a wrapped ErrMDMDenied when err carries the well-known MDM denial signature (HTTP 403 + message containing "mdm_posture"), and otherwise returns err unchanged. The original ErrStatusNotOk remains in the wrap chain so existing transport handling still works.

func Authenticate

func Authenticate(server *config.Server, host *config.Config) (string, error)

Authenticate authenticates with netmaker api to permit subsequent interactions with the api

func CleanJwtToken added in v0.30.0

func CleanJwtToken()

Types

This section is empty.

Jump to

Keyboard shortcuts

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