callback

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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

View Source
var DCRRedirectPorts = []int{8000, 8080, 8888, 9000}

DCRRedirectPorts are the specific ports to try for OAuth callbacks Must match TypeScript PR #84 and DCR registration

Functions

This section is empty.

Types

type CallbackResult

type CallbackResult struct {
	Code             string
	State            string
	Error            string
	ErrorDescription string
}

CallbackResult represents the result of the OAuth callback

type Server

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

Server handles the OAuth callback

func NewServer

func NewServer() (*Server, error)

NewServer creates a new callback server Tries to bind to one of the pre-registered DCR ports (8000, 8080, 8888, 9000) Matches TypeScript PR #84 behavior for compatibility

func (*Server) Port

func (s *Server) Port() int

Port returns the server port

func (*Server) RedirectURI

func (s *Server) RedirectURI() string

RedirectURI returns the full redirect URI Uses /oauth/callback path to match TypeScript PR #84

func (*Server) Start

func (s *Server) Start() error

Start starts the callback server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the callback server

func (*Server) WaitForCallback

func (s *Server) WaitForCallback(timeout time.Duration) (*CallbackResult, error)

WaitForCallback waits for the OAuth callback

Jump to

Keyboard shortcuts

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