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

authentication

package
v1.11.8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package authentication demonstrates application-owned registration, login, account persistence, and hash migration using framework-owned auth mechanics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthComponentsFromEnvironment

func AuthComponentsFromEnvironment() (*auth.TokenManager, *auth.PasswordPolicy, error)

AuthComponentsFromEnvironment constructs immutable production auth policy. Delete the GPP_LEGACY_* configuration after every pre-upgrade credential has expired or migrated.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

Application owns the example's account storage and authentication policies.

func New

func New(db *sql.DB, tokens *auth.TokenManager, passwords *auth.PasswordPolicy) (*Application, error)

New validates dependencies and creates an authentication example application.

func (*Application) RegisterRoutes

func (application *Application) RegisterRoutes(app *gpp.Engine)

RegisterRoutes adds registration, login, and account endpoints to app.

Jump to

Keyboard shortcuts

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