Help us shape the future of Go! Take the 2026 Go Developer Survey

auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package auth contains shared auth primitives used across the auth surface (handlers, middleware, services). Reserved-name validation lives here because it's read by signup *and* by username-change in S10.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsReserved

func IsReserved(name string) bool

IsReserved reports whether name is on the reserved list. The check is case-insensitive — usernames are stored as citext, so we normalize here to match.

func ReservedNames

func ReservedNames() []string

ReservedNames returns a copy of the reserved set as a slice. Used by the route-audit test in handlers_test.go to confirm every registered top-level path segment is present here.

Types

This section is empty.

Directories

Path Synopsis
Package audit writes structured rows into the auth_audit_log table for security-relevant events.
Package audit writes structured rows into the auth_audit_log table for security-relevant events.
Package email is the transactional-email layer for the auth surface.
Package email is the transactional-email layer for the auth surface.
Package password implements argon2id password hashing with PHC-string encoding.
Package password implements argon2id password hashing with PHC-string encoding.
Package pat owns personal-access-token minting, hashing, scope constants, and the auth-middleware verification path.
Package pat owns personal-access-token minting, hashing, scope constants, and the auth-middleware verification path.
Package policy is the single source of truth for "who can do what".
Package policy is the single source of truth for "who can do what".
Package secretbox is a thin AEAD wrapper used to protect at-rest secrets — currently TOTP secrets, future sprints will reuse it for per-user key material (PATs, deploy keys, etc.).
Package secretbox is a thin AEAD wrapper used to protect at-rest secrets — currently TOTP secrets, future sprints will reuse it for per-user key material (PATs, deploy keys, etc.).
Package session owns the cookie-based session pipeline.
Package session owns the cookie-based session pipeline.
Package sshkey wraps the parsing, validation, and fingerprinting of user-supplied SSH public keys.
Package sshkey wraps the parsing, validation, and fingerprinting of user-supplied SSH public keys.
Package throttle implements counter-based rate limiting for the auth surface, backed by the auth_throttle table.
Package throttle implements counter-based rate limiting for the auth surface, backed by the auth_throttle table.
Package token mints high-entropy random tokens and stores their sha256 hashes.
Package token mints high-entropy random tokens and stores their sha256 hashes.
Package totp implements RFC 6238 TOTP (time-based one-time password) enrollment and verification.
Package totp implements RFC 6238 TOTP (time-based one-time password) enrollment and verification.

Jump to

Keyboard shortcuts

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