srpweb

package
v1.85.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 6 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 srpweb serves the browser half of the password sign-in (docs/decisions/0076): one script, this origin's own, that runs SRP-6a in the page so the password is never sent. It is a file and not an inline script because the pages' policy is `default-src 'self'`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Form

func Form(o FormOptions) string

Form is the password block of a sign-in page: a disclosure holding a form the script drives. The inputs carry no `name`, so a browser that does not run the script submits nothing and the password goes nowhere else.

func Handler

func Handler() http.Handler

Handler serves the script. It changes only with a release, so a browser may keep it for a few minutes and ask again with the tag.

func Script

func Script() []byte

Script is the script's source.

Types

type FormOptions

type FormOptions struct {
	// State is the signed state of the page's request.
	State string
	// Summary is the disclosure's title, Note the sentence under it and Caution
	// the warning after the form (empty for none).
	Summary, Note, Caution string
	// Start, Finish and Script are the paths of the two endpoints and of [Handler].
	Start, Finish, Script string
}

FormOptions is what Form needs.

Jump to

Keyboard shortcuts

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