mint

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 5 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 mint makes the NATS user JWT and creds of one endpoint: signed by the account signing key and carrying the endpoint's own permission set (admin.Permissions). There is no per-zone scoped signing key and no tag (ADR 0091): the address is the fence, and the key that signs a user is the account's own. It does no network I/O; the key comes through the Keys seam (ADR 0052).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keys

type Keys interface {
	Account() (nkeys.KeyPair, string, error)
}

Keys is the key store Mint signs with; *ctlkeys.Authority satisfies it.

type Minted

type Minted struct {
	Name       string
	UserPub    string
	AccountPub string
	JWT        string
	Creds      []byte // the creds file contents (JWT and seed): a secret
}

Minted is one issued user. Creds holds the user seed: never log or print it.

func Mint

func Mint(keys Keys, owner, name string, userSeed []byte) (*Minted, error)

Mint issues the user JWT of endpoint name of owner, signed by the account signing key with the permission set of admin.Permissions(owner, name). With userSeed nil it makes a fresh user key; with a user seed (a re-issue) it keeps that user key.

Jump to

Keyboard shortcuts

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