jointoken

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 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 jointoken mints and hashes worker join tokens: the one-time or reusable secrets an operator issues (via the CLI or the REST API) and a worker redeems to enroll and receive its broker credential. It is server-side only (issuance and redemption both happen on sqi-server) and uses the same random-token and hashing primitives as session tokens and API keys (internal/auth/password).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() (token, hash, displayPrefix string, err error)

Generate creates a new random worker join token. It returns the raw token (shown to the operator exactly once), its SHA-256 hash (the only form stored at rest), and a short display prefix for list identification.

func Hash

func Hash(token string) string

Hash returns the hex SHA-256 of a join token, for at-rest storage and constant-length lookup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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