webcallback

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 10 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url string) (*webCallback, error)

New validates the supplied loopback callback URL, opens the listener immediately, and stores the resolved callback URL. The URL must use the http scheme and a loopback hostname such as 127.0.0.1, localhost, or ::1. The port may be omitted or set to 0 to allocate a free port.

Types

type Result

type Result struct {
	Query url.Values `json:"result,omitempty"`
	Err   error      `json:"err,omitempty"`
}

Result contains the callback outcome passed back from the HTTP handler.

func (Result) Code

func (r Result) Code() string

Code returns the OAuth authorization code from the callback query.

func (Result) State

func (r Result) State() string

State returns the OAuth state parameter from the callback query.

func (*Result) String

func (r *Result) String() string

Jump to

Keyboard shortcuts

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