signup

package
v0.0.0-...-70e5bc8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Overview

Package signup provides an http.Handler implementation that serves and validates KeyServer signup requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRequest

func MakeRequest(cfg upspin.Config) error

MakeRequest sends a signup request for the given Config to the Config's KeyServer Endpoint using the Config's TLS certs (if any).

func NewHandler

func NewHandler(baseURL string, fact upspin.Factotum, key upspin.KeyServer, mc *MailConfig) http.Handler

NewHandler creates a new handler that serves signup requests (made by 'upspin signup') and verification requests (visited by clicking the link in the email). The Factotum is used to sign the verification URL. The KeyServer is where the new user will be created. The MailConfig is used to send mail.

func RequestHash

func RequestHash(name upspin.UserName, dir, store upspin.NetAddr, key upspin.PublicKey) ([]byte, url.Values)

RequestHash generates a hash of the supplied arguments that, when signed, is used to prove that a signup request originated from the user that owns the supplied private key.

Types

type MailConfig

type MailConfig struct {
	// Mail holds the mailer used for sending signup emails and notifications.
	mail.Mail

	// Project is the name used in the subject line of signup notifications,
	// to distinguish between test and production keyserver instances.
	Project string

	// Notify specifies the recipient address for signup notifications.
	Notify string

	// From specifies the address from which to send mail messages.
	From string
}

MailConfig holds the mail configuration used by the signup handler.

Jump to

Keyboard shortcuts

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