serve_redirect

package
v1.1.58 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeRedirect

func ServeRedirect(port int, path string, callback func(code string)) (state string, closeFunc func(), err error)

ServeRedirect starts a local HTTP server to receive an OAuth2 authorization code at the given localhost port and path. It accepts a callback to store the received and validated code.

This function returns a state that must be included in the initial OAuth2 request and a function that must be called to close the server. If an error is returned, no server will have been started and the close function will be nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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