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.