oauth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser attempts to open the URL in the default browser

Types

type CallbackResult

type CallbackResult struct {
	Token    string
	Verifier string
	Error    error
}

CallbackResult contains the OAuth callback parameters

type CallbackServer

type CallbackServer struct {
	Port int
	Path string
	// contains filtered or unexported fields
}

CallbackServer handles OAuth callbacks

func NewCallbackServer

func NewCallbackServer(port int, path string) *CallbackServer

NewCallbackServer creates a new callback server

func (*CallbackServer) Start

func (s *CallbackServer) Start(ctx context.Context) error

Start starts the callback server

func (*CallbackServer) URL

func (s *CallbackServer) URL() string

URL returns the callback URL

func (*CallbackServer) Wait

func (s *CallbackServer) Wait(timeout time.Duration) (*CallbackResult, error)

Wait waits for the callback or timeout

Jump to

Keyboard shortcuts

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