weblogin

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 23 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 weblogin serves a one-time sign-in page, on the loopback interface or through usc.sh.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wait

func Wait(ctx context.Context, pageURL string) error

Wait blocks until the sign-in page at pageURL finishes or stops serving. It returns an error only when the page reports a failed sign-in.

Types

type Options

type Options struct {
	// Auth supplies CredentialsFile, SessionFile, and DuoDeviceName; other fields are ignored.
	Auth auth.Options
	// Probe is the site opened to confirm a sign-in that needs no new Duo device.
	Probe site.Name
	// Relay is the site that serves the page and forwards its sealed requests
	// here, for a browser that cannot reach this machine. Empty serves the
	// page on the loopback interface.
	Relay string
}

type Server

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

func Listen

func Listen(options Options) (*Server, error)

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

Serve runs until sign-in finishes or the page expires.

func (*Server) Started

func (s *Server) Started() Started

type Started

type Started struct {
	URL       string    `json:"url"`
	ExpiresAt time.Time `json:"expires_at"`
}

Directories

Path Synopsis
Package page holds the sign-in page, which the CLI serves on loopback and usc.sh serves for a sign-in on another machine.
Package page holds the sign-in page, which the CLI serves on loopback and usc.sh serves for a sign-in on another machine.

Jump to

Keyboard shortcuts

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