loopback

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 9 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 loopback serves the redirects of the auth sessions desktops open in the default browser (driver.ItemAuthSession), on a loopback address as RFC 8252 section 7.3 asks: a listener on 127.0.0.1 at a port the system picks, taking one callback. It reads the browser's GET itself rather than through net/http, which an app links only by asking for it (docs/architecture/layers.md, What an app links).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sessions

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

Sessions are a surface's loopback auth sessions. Its methods run on any goroutine.

func (*Sessions) Close

func (s *Sessions) Close()

Close stops every session's listener, as the surface closes.

func (*Sessions) Handle

func (s *Sessions) Handle(id uint32, r driver.AuthRequest, open func(url string, answer func(opened bool)), page string, dispatch func(driver.Event))

Handle carries out r for session id: a start listens and reports the redirect, an open has open show the URL in the default browser and answer, on any goroutine, whether it did, and a cancel stops listening. page is the message the browser's tab shows once the callback arrives; dispatch hears the session's events.

func (*Sessions) Has

func (s *Sessions) Has(id uint32) bool

Has reports whether session id is one of s's.

Jump to

Keyboard shortcuts

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