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.
Click to show internal directories.
Click to hide internal directories.